Rotating a child shape relative to its parent's orientation
- by user1423893
When rotating a shape using a quaternion value I also wish rotate its child shape.
The parent and child shapes both start with different orientations but their relative orientations should always be the same.
How can I use the difference between the previous and current quaternions of the parent shape in order to transform the child segment and rotate it relative to its parent shape?
public Quaternion Orientation
{
get { return entity.Orientation; }
set
{
Quaternion previousValue = entity.Orientation;
entity.Orientation = value;
// Use the difference between the quaternion values to update child orientation
}
}