[ODE] Spheres pass through trimeshes?
Jon Watte
hplus-ode at mindcontrol.org
Wed Apr 28 16:26:11 MST 2004
What you really should do next is create a sphere in a position where you know it should collide with a triangle mesh, and then set a breakpoint before calling dCollide(), and trace through the code. It's not that hard to understand what it's doing.
Obvious things to check, as a cheat sheet:
First, make sure you're actually calling dCollide(), and creating contact joints based on the results. (And destroying them after step)
Second, make sure you're passing the number if INDICES to the trimesh data build functions, not the number of triangles.
Seconds, make sure the triangles are wound the right way -- triangles are on-sided. To be certain, you could duplicate every three indices, swapping the position of index 1 and 2 in the second copy. That will make sure that all triangles have opposing-facing counter-parts, thus making all surfaces double-sided.
Good luck!
Cheers,
/ h+
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Ken
Kopecky
Sent: Wednesday, April 28, 2004 3:45 PM
To: ode at q12.org
Subject: [ODE] Spheres pass through trimeshes?
Hey people,
I'm Ken Kopecky, senior in mechanical engineering at Iowa State. For
my computer graphics final project, I'm attempting to simulate that
Marble Works toy that most of us played with when we were young. I
wrote code to create all the major pieces out of trimeshes, but my
marble seems to prefer to fall straight through the meshes rather
than acting like it should. At first I thought that maybe I just
wasn't creating the trimeshes properly, but I wrote a little function
to draw a wireframe based on the trimesh data, and everything looks
okay. Does anyone have any advice for me? My project's due tuesday
:) Thanks in advanc.
Cap'n Ken
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list