[ODE] handling player collision with static and dynamic objects separately

Patrick McColgan patrick at torcinteractive.com
Tue Apr 18 00:43:29 MST 2006


You could add user data to all your geoms (e.g. a bool called dynamic) 
then after a successful narrow phase collision you could check the geoms 
for whatever pairs you want to handle yourself and manipulate the joint 
narrowphase returned.

Ronnie Joseph wrote:
> hi,
>     i am trying to add ode to my game engine , adding ordinary objects were 
> pretty
> straight forward but player and ai movement have been a real pain.i would 
> like to
> control player-static world collisions myself and let ode handle player - 
> dynamic objects.
> this way i have complete control over player movement and can have dynamic 
> physics
> as well.
>
> my current algorithm is,
>
> 1) get keyboard input and view dir and create move dir
> 2) slide player box thru static environment in move dir
> 3) set ode box to previous player pos , velocity to move dir
> 4) dworldstep()
> 5) set player pos to ode box pos
>
> i also disabled collision with static geometry using collide bits and also
> reset the orientation of ode player box each frame.i like to know
> if anyone has tried anything similar , any suggestions, i dun care for
> perfect physics but only has to look rite.
>
> thanks.
>
> _________________________________________________________________
> Shah Rukh fan? Know all about the Baadshah of Bollywood. On MSN Search 
> http://server1.msn.co.in/profile/shahrukh.asp
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>   



More information about the ODE mailing list