0
\$\begingroup\$

How would I alter physical calculations to account for frame of reference of a physical body?

Currently I have a world that is a collection of rigid body objects that act on each other. There is no frame of reference for collision detection or resolution with respect to each body (i.e. body A has a velocity of zero when resolving a collision with body B and vice versa). The world is the reference frame, therefore everything is moving that has a non-zero velocity.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ There is always a frame of reference, you have to be consciously aware of what frame you're working in and it appears that you're working in world space but have forgotten that. There is no need to go into local object space here, IIRC. \$\endgroup\$ Commented Apr 21, 2013 at 3:15

1 Answer 1

1
\$\begingroup\$

If you need a calculation in object space for any reason, just multiply by the object's inverse transformation to find positions and orientations relative to that object. This makes the position and orientation of that reference object zero and identity. All object's positions and orientations will be relative to this reference object.

To calculate the relative velocities, just subtract the velocity of the reference object from the velocities of the other objects, to get their relative velocities, which again makes the velocity of your reference object zero, regardless of its world velocity.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .