[ODE] freezing a moving object

Patrick McColgan patrick at torcinteractive.com
Thu Jul 21 16:33:35 MST 2005


I assume you mean the static wall is without a body.

There are probably a number of approaches; if the gravity is the only 
thing  bothering you, you could disable it on the colliding body.

A better approach would probably be that on contact you make a fixed 
joint between the world and the body at the body's position.  
Alternatively you could also destroy the colliding object's body and 
keep the geom (if you were going to use the object as a dynamic object 
again; i.e. it never escapes the wall) this way you escape the body (and 
joint) updates every frame.

Vianney Lecroart wrote:

>Hello,
>
>I would like to know the best way to achieve that:
>
>I have a static wall (without geom) and i want all moving objects that
>touch the wall instantaneously freeze, as if they were glued on the
>wall.
>
>I try that: detect the collide with the wall and then setup the speed
>of the object to 0 before every physic loop but it's not really good,
>it still slowly fall (due to the gravity) and if another object falls
>on this object, it moves.
>
>Thank for tips
>
>Vianney Lecroart
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>
>
>  
>



More information about the ODE mailing list