Show Posts
|
|
Pages: [1] 2 3 4
|
|
2
|
Crystal Space Development / Support / Re: portals
|
on: May 12, 2006, 01:52:37 pm
|
|
I have another question - what are the
csVector3 * vertices, int num_vertices,
for in the arguments of Engine->CreatePortal()? also how do i get the number of vertices? is this something can get from the mesh?
regards, Kate
|
|
|
|
|
3
|
Crystal Space Development / Support / portals
|
on: May 12, 2006, 01:29:31 pm
|
|
hi there
I see how to create sectors, and specify the destination sector, but what about the actual destination position? How does the portal know where to position the player in the destination sector?
regards Kate
ok - ive done this by using SetWarp();
|
|
|
|
|
6
|
Crystal Space Development / Support / particle texture problem
|
on: May 09, 2006, 02:01:06 am
|
Hi there, I have a problem which is that when I create an explosion, whatever texture I use just shows as black. I am using the following code (using the explo texture from walktest) There are no errors about the texture not being found, so I know its not that thats the problem : //Setup missile explosion ready for use csRef<iGeneralFactoryState> fstate; csRef<iEngine> engine = app->GetEngine(); csRef<iLoader> loader = app->GetLoader(); missile_explo_factory = engine->CreateMeshFactory ("crystalspace.mesh.object.explosion", "explosion"); if (!missile_explo_factory) { app->ReportError("Failed to load explosion mesh factory!"); } if (!loader->LoadTexture ("explosion_texture", "img/explo.jpg")) { app->ReportError("Error loading 'explo' texture!"); }
//Create it csRef<iMeshWrapper> explosion = app->GetEngine()->CreateMeshWrapper(missile_explo_factory, "explosion", sector, pos); if (!explosion) { app->ReportError("Error creating explosion mesh!"); return; } explosion->SetZBufMode(CS_ZBUF_TEST); explosion->SetRenderPriority (app->GetEngine()->GetAlphaRenderPriority ()); csRef<iParticleState> partstate= scfQueryInterface<iParticleState>(explosion->GetMeshObject());
csRef<iMaterialWrapper> mat = app->GetEngine()->GetMaterialList()->FindByName("explosion_texture"); partstate->SetMaterialWrapper (mat); partstate->SetColor (csColor (1, 1, 0)); partstate->SetChangeSize (1.25); partstate->SetSelfDestruct (3000); partstate->SetChangeRotation (5.0f); partstate->SetAlpha(0.5);
csRef<iExplosionState> expstate ( SCF_QUERY_INTERFACE (explosion->GetMeshObject (), iExplosionState)); expstate->SetParticleCount (100); expstate->SetCenter (csVector3 (0, 0, 0)); expstate->SetPush (csVector3 (0, 0, 0)); expstate->SetNrSides (6); expstate->SetPartRadius (0.15f); expstate->SetLighting (false); expstate->SetSpreadPos (0.6f); expstate->SetSpreadSpeed (2.0f); expstate->SetSpreadAcceleration (2.0f); expstate->SetFadeSprites (500); explosion->PlaceMesh ();
regards, Kate
|
|
|
|
|
10
|
Crystal Space Development / Support / lighting causing segfault only with textured level
|
on: May 04, 2006, 02:42:36 am
|
|
Hi there,
Up until now I have just had ambient lighting for my map.
I tried doing: csRef<iLight> light = engine->CreateLight("DynLight", csVector3(-19, 120, 34), 300, csColor(1, 1, 1)); if(!light) { app->ReportError("Failed to create light!"); } levelsector->GetLights()->Add(light);
This works fine on an untextured map (where textures get replaced with the checkerboard) , but causes a segfault when I use the textured map.
It is the
levelsector->GetLights()->Add(light);
line that causes the segfault. Valgrind debugger gives me the following:
==28337== Process terminating with default action of signal 11 (SIGSEGV) ==28337== Access not within mapped region at address 0x0 ==28337== at 0x260C0E1B: CastShadows_Front2Back(csKDTree*, void*, unsigned, unsigned&) (in /home/kate/csinstall/lib/crystalspace/frustvis.so) ==28337== by 0x158E90EE: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158E9175: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158E9125: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158E9125: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158E9125: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158E9125: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158E9125: csKDTree::Front2Back(csVector3 const&, bool (*)(csKDTree*, void*, unsigned, unsigned&), void*, unsigned, unsigned) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x260C570A: csFrustumVis::CastShadows(iFrustumView*) (in /home/kate/csinstall/lib/crystalspace/frustvis.so) ==28337== by 0x158ACEB3: csSector::RealCheckFrustum(iFrustumView*) (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x1584FBCD: csLight::CalculateLighting() (in /home/kate/csinstall/lib/crystalspace/engine.so) ==28337== by 0x158391B9: csEngine::ShineLights(iRegion*, iProgressMeter*) (in /home/kate/csinstall/lib/crystalspace/engine.so)
It looks like a null pointer problem at : CastShadows_Front2Back(csKDTree*, void*, unsigned, unsigned&) (in /home/kate/csinstall/lib/crystalspace/frustvis.so)
any ideas what is causing this. Im assuming it is something to do with the textures but what? Could missing/wrongly applied textures cause the problem?
regards,
Kate Mallichan
|
|
|
|
|
12
|
Crystal Space Development / Support / joystick
|
on: May 03, 2006, 11:08:51 pm
|
|
Hi there
I want to use a joystick with my game,
When I run the joytest app provided with CS I get: failed to initialise plugin: crystalspace.device.joystick.linux
Do I need something specific installed for joystick support?
Kate Mallichan
|
|
|
|
|
14
|
Crystal Space Development / General Crystal Space Discussion / Re: Orientation vector
|
on: May 01, 2006, 03:40:48 pm
|
|
I am using the following code:
car->AddRelForce(CS_VEC_FORWARD*acceleration_force); car->Update();
The problem is that the force seems to be applied along the nearest world axis, so that the car veers towards the axes when it is supposed to be moving forwards in the direction is is pointing. I think I may have to do something with car->GetOrientation() but I am not sure what. I would appreciate any help you can give as this is becoming an urgent situation with a project deadline coming up!
thankyou for your help,
Kate Mallichan
|
|
|
|
|
|