[ODE] ODE Body Re-enabling

Jason Perkins starkos at gmail.com
Fri Jul 28 09:53:33 MST 2006


On 7/28/06, Jon Watte (ODE) <hplus-ode at mindcontrol.org> wrote:
> However, you can still do what you want in the current API. Ways to do
> it involve either removing the body from the geom (without destroying
> it) and removing the body from the space, OR (perhaps better) keeping
> the auto-disable, but knowing that this body won't want to wake up,
> create a contact joint between the "other" object and NULL, rather than
> between the two objects. This means that the body won't know it was
> collided against (no contact joint created), and thus won't wake up.

That last one sounds like the right approach. As a small addition, you
might consider using the category bits on the geom to flag which ones
you have manually disabled (so you can tell them apart from
autodisabled bodies).

HTH,

Jason



> G. Brenner wrote:
> > Jon,
> > Jason,
> >
> > (I apologize for the direct email ... I am an ODE user (but not
> > currently subscribed to the mailing list)
> >
> > About a month ago someone asked about how to "permanently" disable a
> > body (http://q12.org/pipermail/ode/2006-June/019386.html).  Both of you
> > kindly responded and I understand your responses (basically to keep the
> > geom and destroy the body).  However, I would like to be able to
> > "temporarily" disable and then reenable a body keeping all other body
> > state intact ... I need this for purposes other than those the
> > AutoDisable framework was designed for.  Is it feasible to simply
> > introduce an "AutoEnableOnCollision" sort of property on a body that
> > could be tested in the collision code prior to reenabling the body after
> > a collision?  Nulling the body is causing us some minor
> > refactoring/testing grief in a rather large ODE-related project we are
> > building.  Could this be a "simple if statement" somewhere in util.cpp -
> > dxProcessIslands method or is this a "deeper issue"?  From an API
> > perspective I would like to be able to simply call something like:
> > body.Enabled = false; body.AutoEnableOnCollision = false; to keep the
> > body from being reenabled (and eliminating the need to null it).
> >
> > Any thoughts or suggestions would be greatly appreciated ... have a good
> > day,
> >
> > Greg
> >
> > ------------------------------------------------------------------------
> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
> > rates.
> > <http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com>
>


More information about the ODE mailing list