So everything always seems to be moving ahead nicely until I have to play with vectors and other complex math stuff. It reminds me I'm an artist by trade, not a programmer lol.
I have a prototype tank that aims at a wherever the mouse is on my terrain using the Smooth Look At Direction action. This works nicely.
The problem I have is with the rotation of the turret on slopes. I just want the tank to rotate its turret around its local Y axis.
Hopefully these pics will detail it better:
This shows the problem. The turret clips through the tank when trying to rotate on slopes, this happens wether I have the Keep Vertical on or off.
Below is what it should look like, regardless of angle of slope or position of the mouse. The turret only rotates around it's local Y axis:
I know the answer lies in some vector equation that completely eludes me..
How do I use the Smooth Look actions yet keep the rotation only on the local Y axis..?? sorry If I haven't explained well.