Crystal Space
Welcome, Guest. Please login or register.
August 29, 2014, 02:50:28 am

Login with username, password and session length
Search:     Advanced search
9008 Posts in 2043 Topics by 8357 Members
Latest Member: Msyexelcarl03
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Problem with physics and world files / terrain meshen
« previous next »
Pages: [1] Print
Author Topic: Problem with physics and world files / terrain meshen  (Read 1629 times)
TurboGlider
Newbie
*
Posts: 4


View Profile
« on: August 07, 2005, 02:29:47 pm »

If I open phystut and want to add a worldfile instead of the room created by 6 walls.

How do I get the world meshes like terrainmesh to work with the other physical objects?
If I connected a terrainmesh in world file and use this code, then my application crash.
Does anyone have a solution to this problem?

Code:
  csRef<iMeshWrapper> flyttobj = engine->FindMeshObject ("terrain");
 
  csRef<iRigidBody> rb = dynSys->CreateBody ();
  rb->SetMoveCallback(0);
  rb->SetPosition (csVector3 (0));
  rb->MakeStatic ();
 
  csOrthoTransform tf;
  rb->AttachColliderMesh (flyttobj, tf, 10, 1, 0.8f);

It's the last row above that makes ODEDYNAM.cpp crash at this row :

Code:
iPolygonMesh* p = mesh->GetMeshObject()->GetObjectModel()
  ->GetPolygonMeshColldet();

in this function

Code:
bool csODERigidBody::AttachColliderMesh (iMeshWrapper *mesh,
    const csOrthoTransform &trans, float friction, float density,
    float elasticity, float softness)

Greetings TurboGlider
« Last Edit: August 07, 2005, 09:04:52 pm by TurboGlider » Logged
TurboGlider
Newbie
*
Posts: 4


View Profile
« Reply #1 on: August 07, 2005, 09:14:49 pm »

I found one error, should be "Terrain", not "terrain". Now it won't crash.  (it took at least 1 day to solve that)

But I'm still have some trouble, I get no collisionsdetection to terrain.

Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 7.178 seconds with 17 queries.