[ODE] Trimesh collision doesn't seem to be functioning

Ryan O'Connor ryan at pcsoftware.co.nz
Sun Nov 20 22:41:26 MST 2005


OK I built some of the tests on windows from the most recent UNSTABLE.
Test-boxstack runs fine at about 1000fps. Test-trimesh crashes on the second
line of simLoop():

dSpaceCollide (space,0,&nearCallback);

With a segfault reading location 0x00000000. space variable seems to be
valid, as does the callback function. Shouldn't test-trimesh just work out
of the box, esp. if other tests do? What could be wrong? Even my game didn't
crash using trimesh, it just failed to detect collisions. Please let me know
if I can be of any more help or if you need any more information.


roc




From: Ryan O'Connor [mailto:ryan at pcsoftware.co.nz]
Sent: Sunday, November 20, 2005 12:04 PM
To: ode at q12.org
Subject: Re: [ODE] Trimesh collision doesn't seem to be functioning in
mycase (how to build drawstuff on msvc?..)

Hi, thanks for your reply. I'm having problems compiling the test projects
using MSVC7 (I'm on winxp). They require drawstuff to be built separately I
think. To build drawstuff I need X11/Xlib.h. I have no idea where to find
this file in windows, and also what others I may need. I have tried using
both single-trimesh and double-trimesh in debug and release configurations
of the latest unstable branch, with no luck. I made sure to have the correct
headers and libs, and did a complete rebuild on our project. I just need
more instructions on how to compile drawstuff in order to build & run
test-trimesh.


Jon: The swept sphere sounds like it would be really good, but I would like
to get the project at least working as it was, before I try a major
modification like that.
If I crank the time step down to a fine amount and observe it slowly
drifting through the trimesh from gravity, it definitely should detect the
collision because the sphere's displacement is way less than it's radius.

Maybe the problem is with my trimesh. Does it still automatically calculate
normals for you in the unstable branch?




-----Original Message-----
From: Bram Stolk [mailto:bram at sara.nl]
Sent: Saturday, November 19, 2005 11:37 PM
To: Ryan O'Connor
Cc: ode at q12.org
Subject: Re: [ODE] Trimesh collision doesn't seem to be functioning in my
case

Ryan O'Connor wrote:
> I tried compiling ode UNSTABLE and using it on an existing project. I 
> hoped it would improve stability of collisions. At the moment if the 
> frame rate of our game drops below about 40fps, or you go too fast 
> into a wall (sphere-trimesh collision), the sphere will penetrate 
> straight through. What I found was that no collisions are detected 
> between
the sphere and anything.
> All objects are in the same space and I have custom collision code on 
> the callback to quickly discard irrelevant objects from collision 
> response. It all worked ok on 0.5 stable, but not on the latest 
> unstable branch. Any ideas? What has changed that's relevant since 
> then? I'm kinda stumped.. It leads me to believe I set my basic scene 
> up wrong before and it's only evident now because the ode code is better.

Ok, first of all:

- Do all the demos in ode/test work for you properly?
   If so, it may be your own code, else UNSTABLE may have a problem.

Second:

- Could you try building ODE with double and with single
   precision, and check to see if they both have the problem?
   I've seen a case where double is ok, and single is not.

Also:
What platform are you on? Are you linking against the correct lib, and
compiling with the correct headers? Did you do a make clean on your project
after you switched ODE branches?

   bram


> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode







More information about the ODE mailing list