[ODE] Player camera

Ruari O'Sullivan ro1615 at bris.ac.uk
Wed Sep 15 12:55:53 MST 2004


Pierre Renaux wrote:

>I'm just trying to have simple first person camera that behaves like Quake.
>
>I already made such system in the previous version of the physics (which
>weren't using ODE). It's pretty simple to just derive a sliding point...
>
>What should I do ? should get the contact point and make the thing slide
>myself as I was doing previously.
>
>Or is there some simple way to make ODE behave the same way, simple hitting
>a plane and sliding along it instead of bouncing.
>
>I would guess I just have to disable bouncing and remove all friction, but
>the parameters are a bit hard to grasp for me. Which one should I tweak to
>achieve this effect ?
>  
>
This is all in the callback for collision: when you create contact 
joints, you need to specify friction and bounciness. The parameters are 
contact.surface.mu for friction and contact.surface.bounce for 
bounciness - set both of these to zero when your player geom's involved 
and you're done. :)

Oh - also, the mode flags (contact.surface.mode) shouldn't include 
dContactSoftCFM or collisions will be spongy and you'll sink into walls 
a little before bouncing back out.

-randomnine-


More information about the ODE mailing list