Skip to main content
gamedev.net
🔒 Locked

ODE Problems

Started by segt 2 replies 600+ views
Original Post
segt
segt
EDIT: SOLVED THIS PROBLEM, LOOK TO 4th POST NOW. Hi, My implementation of ODE works with moving bodies/geoms around. At the moment I have a box dropping towards a plane that I created as a trimesh. When the box reaches the plane, ODE correctly generates a contact point. I then handle this by using dJointCreateContact, inserting the contact into my world's contactgroup. At this point everything was working, but the box would pass right through the plane. I found some source of an ODE implementation and saw the use of dJointAttach to then attach the contact joint to each body. After using this, when I call the worldstep (or worldquickstep), ODE crashes. My box has a body and geom where as the tri mesh is just the geom. Edit: I just tried it with an actual plane instead of a tri-mesh with the same result, WorldStep still crashes. [Edited by - segt on August 8, 2005 8:35:13 PM]
segt
segt
Okay, I made a really really elementary mistake :(. I wasn't initializing the bodyid of the trimesh to 0. Fixed my crash, but now the box is still dropping straight through the trimesh instead of colliding.
segt
segt
Alright, got some collision going. I had to increase the max number of contact points for it to work.
segt
segt
I'm not sure if I should even bother posting anymore about this since I seem to figure out what I'm doing wrong after a little while :)

Anyhow, I need some input on the surface parameters for objects to generate realistic collision reactions. I'm still working with the box and trimesh plane for now. After a contact is identified, I pass the surface struct and the objects to a post collision function. There, I would theoretically take the surface parameters from each object and combine them somehow (I've seen people average the numbers or run them through a small algorithm) and then send the resulting surface info back and create a contact joint.

It seems however, that no matter what I set the surface info to be, the collision reaction is the same. For instance, setting the friction coefficient to infinity and the bounce to 0 should cause the box to pretty much stop dead on the surface. Instead, the box bounces a bit and slides a ways to one side before falling off the surface.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.