I need a code to make “own” track “objectB” using only z axis.
The Track axis has to be -y and the up axis has to be z.
But the thing is, when the object that contains the script rotates (because it’s tracking Object B), it can only rotate around z axis. So that -y points object B, only using z axis.
Basically, you want to get the vector to that object, but only for x and y. You then align your object with that vector.
Afterwards, you specify that you want to align along the y axis, and finally negate the vector to align along the
-y axis.