Rotation Transformation From Hell
Hello guys,
I have already tried to get answer here. There is only one problem - that my question seems to be far more complicated than one might think at first.
Short version:
I have a Tank and a few Towers attached to it. Every Tower consists of 2 objects:
Head (Y axis local space rotation only)
Gun (X axis local space rotation only)
These Towers are shooting projectiles that have their trajectory curved by gravitation force. I predict this "bullet drop" using "Angle \theta required to hit coordinate (x,y)" from here. Calculated angle is on the world space X axis. Tower Gun then seeks to aim in that angle by changing it's X axis local space angle accordingly. Everything works great until the tank rotates by some debris it moves over. Then it breaks. Both head and gun should be rotated along their respective axes in local space in such a way they still will be able to hit the target perfectly. More info in greater detail is available in the forum post I linked to this Question.
I will be forever grateful for any help.
add the SHORT VERSION of the question here .. so it's here for all time. Click Edit
Your answer
Follow this Question
Related Questions
Smooth Rotation Quaternion Lerp? 1 Answer
How to automatic reference another GameObject Transform? 1 Answer
instantiate projectiles towards player 0 Answers
Aim Assist 0 Answers
[Urgent] Finding Nearest Target 2 Answers