So, I’m making a tank.
The tank has a fuselage that hold the barrel on top of the tank body
I’m trying to get this so that the fuselage stays perfectly flat over the tank body and rotates along its local Z axis to face where my camera is currently pointing, BUT…
I’m not fully understanding how to manipulate ONLY the local z of the fuselage over the tank body when the tank body’s world rotation is constantly changing, driving over hills, bumps etc.
This is what happens…
But obviously it works fine on level ground, when there are no changes to pitch and roll.
What am I doing wrong? How to apply the Z rotation of the fuselage around the tank bodies local UpVector while keeping the WORLD roll and pitch of the tank body on the fuselage?
[4-27]