Using Ode listeners...

termit7577

30-01-2007 16:52:07

Hi everyone!
In my app ODE seems to be working fine. However, there is one thing which I definitely cant get to work - its the rays. I mean creation of worlds, spaces, geometries, all goes really well. They stepping also does its job. But when I try to implement rays... omg... something definitely goes wrong. To be more specific - mpStepper->step(lTimeElapsed);
mpWorld->synchronise();


That's the two functions that get called up in my state's update method (i.e. that's just before renderoneframe(). Geometry creation and then adding forces goes either in the scene loading, or in KeyPressed or where else it has to be in. But with rays it does seem to be a bit of a trouble. As I get it, ODE, like any other physics library must have some OnCollide method or something. But after examining OgreOde, unfortunately I was unable to find a way to implement it. I would be greatfull for any advice on this at all!

luis

31-01-2007 08:12:24

see landscape demo:

bool LandscapeFrameListener::collision(OgreOde::Contact* contact)

and:

Geometry::getUserData
Geometry::getUserObject