[ODE] bouncing back after collision with wall

Vrej Melkonian vmelkon at yahoo.com
Wed Aug 18 09:39:44 MST 2004


--- Jon Watte <hplus-ode at mindcontrol.org> wrote:

> 
> Enable the Bounce parameter of the contact geom when
> 
> creating the contact joints.
> 
> Note that the reason ball<->ball collisions "bounce"
> 
> is the symmetry between the forces resolving the 
> contacts.
> 
> Cheers,
> 
> 			/ h+

In my call back, I do set the bounce parameter

////////////////////CODE/////////
dContact contact[MAX_CONTACTS];		//Up to MAX_CONTACTS
contacts per box-box
for(i=0; i<MAX_CONTACTS; i++)
{
   contact[i].surface.mode=dContactBounce |
dContactSoftCFM;
   contact[i].surface.mu=1.0;
   contact[i].surface.mu2=0;
   contact[i].surface.bounce=0.1;
   contact[i].surface.bounce_vel=0.1;
   contact[i].surface.soft_cfm=0.01;
}
////////////////////

When I made the walls into a body while making them
large enough so they won't get pushed by the balls,
the bounce behavior becomes correct.
Also when I do this, the walls go more than half way
through the floor and vibrate for some reason.
Even if I make the wall fall from a above, they do
this.
The walls are just boxes.

I know that the FAQ recommends against this, but both
ways have a failing.

TIA



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


More information about the ODE mailing list