[ODE] how exactly Contact Joints work?

Roland Plüss roland at rptd.dnsalias.net
Thu Aug 31 10:57:53 MST 2006


So far contact joints seem to work in my system except some strange
behaviour. Perhaps somebody can tell me if I'm doing here a conceptual
error. I have an object that during a step ended up in a collision. The
stats of the object are the following ( values before the impact
happens, values in (x,y,z) with x going right, y going up and z going
into the screen, no rotations ):

position ( 13.550000,-3.881641,1.450000 )
velocity ( 0.000000,-10.370230,0.000000 )
time-step = 0.01s

The ground is at -4. The collision results those informations for the
contact joint:
hit-point ( 13.550000,-4.000000,1.450000 )
time-of-impact = 0.175373 ( with 1.0 beeing end of time step )
hit-depth ( 0.086325 ) [ depth after 0.01s, hence what ODE demands for
contact joints ]
hit-normal ( 0.000000, 1.000000, 0.000000 )

Hence the contact joint looks like this:
contact.geom.pos[ 0 ] = hitPoint.x;
contact.geom.pos[ 1 ] = hitPoint.y;
contact.geom.pos[ 2 ] = hitPoint.z;
contact.geom.pos[ 3 ] = 0.0f;
contact.geom.normal[ 0 ] = normal.x;
contact.geom.normal[ 1 ] = normal.y;
contact.geom.normal[ 2 ] = normal.z;
contact.geom.normal[ 3 ] = 0.0f;
contact.geom.depth = hitDepth;
contact.geom.g1 = 0;
contact.geom.g2 = 0;
contact.surface.mode = 0;
contact.surface.mu = 0.0f;
contact.surface.bounce = 0.0f;
contact.surface.bounce_vel = 0.01f;


I dropped the box from roughly 6m height. Although there is no
bounciness the box jumps back to nearly 3m height. Sometimes though it
stays on the ground. I try to find out what could be going wrong here. I
know usually ODE is used in the way that the object position is at the
place of collision not as in my case before the collision. Now this
should not change the fact that we need the force required to push the
box out of collision. No matter if the box is in the floor or slightly
in front of it the force should bring the final velocity of the box to
nearly 0 but instead it propells it high up hence an unreasonable huge
force is applied. How can this happen?

The same phenomena occurs too if the timeToHit is 0.0f hence the case
ODE is usually used for. Hence it can not be simply due to my slightly
altered system.

-- 

Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.dnsalias.net/ )
- Game Engine: Drag(en)gine (
http://epsylon.rptd.dnsalias.net/dragengine.php )
- Normal Map Generator: DENormGen (
http://epsylon.rptd.dnsalias.net/denormgen.php )

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://q12.org/pipermail/ode/attachments/20060831/5fcf92cd/signature.bin


More information about the ODE mailing list