playMaker

Author Topic: How to syncronize 2 objects with a quaternion…?  (Read 898 times)

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
How to syncronize 2 objects with a quaternion…?
« on: November 23, 2021, 10:39:05 AM »
Here's my goal:

2 gameobjects which might be oriented any direction at start.

1st object is rotated (by outside force or script) and the 2nd object stays synchronized.

I'm new to quaternions  :o they feel a bit like sorcery…

I think that I store the 1st object's orientation, invert it, then multiply that against the object's current rotation (every frame).

that should give me a quaternion that is just the current rotation without the original orientation….

then I set the 2nd object's rotation (every frame), multiplied against its inverted original orientation.

 ??? Does that sound correct?