Crystal Space
Welcome, Guest. Please login or register.
November 21, 2017, 03:47:50 am

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80549 Members
Latest Member: Bertysafor7
* 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 2160 times)
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?

  csRef<iMeshWrapper> flyttobj = engine->FindMeshObject ("terrain");
  csRef<iRigidBody> rb = dynSys->CreateBody ();
  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 :

iPolygonMesh* p = mesh->GetMeshObject()->GetObjectModel()

in this function

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
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.

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 4.461 seconds with 15 queries.