[ODE] example for using trimesh landscapes
Duncan Frostick
duncanf at f2s.com
Wed Oct 27 16:41:21 MST 2004
Those examples are godsends! Cheers for putting them up guys. However,
I'm still having trouble with my trimesh collisions and I'm not sure why.
I've tried to replicate your ODE setup Tyler as much as I could see (Ode
init, collision settings... couldn't find mass and density settings of
bodies though). My problem is that nothing seems to collide in a natural
fashion, and when they do most of the time they bounce around
erratically and/or get embedded in each other. That's a really lame
description of the problem I know, so if you want a look at what I mean
here's a (Win32 DirectX SDK built... sorry!) binary:
http://www.duncanf.co.uk/~dunc/project/DuncEngine.zip
Should just work upon running, and instructions in the top left of the
window when it runs. I'd really appreciate it if someone could have a
look at how the bodies are behaving and see what they think is going
wrong. I think it's particularly puzzling how the boxes rest in weird
positions in the floor plane sometimes. There's a copy of the init and
callback functions being used here:
http://www.duncanf.co.uk/~dunc/project/DuncEnginePhysics.cpp
If I make the gravity as strong as earths (which I aim to do
eventually), the box bodies just embed themselves in the trimesh and
don't do anything else. The trimesh has no body object associated with
it, it's just a geom - the boxes all have their own box bodies. The
trimesh is kept static by setting it's position explicitly each frame, I
tried a fixed joint to the environment with a body associated to the
trimesh, but there was no difference. Also, if I set dWorldSetContact
MaxCorrectingVel and SurfaceLayer to try to fix things I just get
objects embedding themselves or falling straight through the mesh.
The eventual aim of my project is to get a funky air hockey game going,
so the smoothness of the trimesh collisions is pretty crucial.
Cheers for any help you can give,
Duncan
More information about the ODE
mailing list