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

Pierre Renaux prenaux at alias25.org
Fri Jun 25 00:58:45 MST 2004


I didn't try myself but this particular point is addressed in the
documentation:

==============
12.10. How do I make ``one way'' collision interaction Suppose you need to
have two bodies (A and B) collide. The motion of A should affect the motion
of B as usual, but B should not influence A at all. This might be necessary,
for example, if B is a physically simulated camera in a VR environment. The
camera needs collision response so that it doesn't enter into any scene
objects by mistake, but the motion of the camera should not affect the
simulation. How can this be achieved?

Here is a good solution: when the collision is detected, don't create a
contact joint between A and B as you normally would. Instead, attach the
contact joint between B and 0 (the static environment). That way the body A
will appear to B as though it is static and unmovable. This approach may
result in some penetration between A and B, but this will not be a problem
in many applications.
==============

- Pierre

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of
andresch at cox.net
Sent: Thursday, June 24, 2004 10:36 PM
To: ode at q12.org
Subject: [ODE] Camera should be a body with zero mass?


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

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list