[ODE] Camera should be a body with zero mass?

andresch at cox.net andresch at cox.net
Fri Jun 25 16:46:56 MST 2004


> The camera in my simulation is implemented as a body/geom in ode.
> I want my camera to follow my character as it moves and rotates
> (third person), so I attach them to each other with a slider, and
> all is well except...
> the camera's mass affects the characters movement.  I want the
> camera affected by the guy, but not the guy affected by the
> camera, in other words the camera should be a body with zero
> mass.  If I set it's mass to zero, bad things happen so I'm
> thinking you're not supposed to do that. How can I have a
> body/geom that reacts to the things it's joined to but does not
> affect them?
>
> -Andy

I had an idea. I just made the camera a transform geom and hooked it to the same body as the guy it should follow, that way the center of gravity is in the guy but the camera is behind and above, makes sense, but I'm having this challenge...
Whenever I ask for the position of the transform geom, I just get the position of the body, that's not what I want. how do I get the transform matrix for the transform geom, as it is once transformed from the body?




More information about the ODE mailing list