Turret Rotation Relative to Body
Not sure if I'm just completely missing something because it seems like this shouldn't be an overly hard problem to overcome, but...
I've got an object, a mech but it may as well be a tank in operation, made up of two objects- the legs/tracks, and the torso/turret. I want the torso's y-rotation to always be set to the leg's y-rotation, modified by a torso set value which would be modifiable by the player.
So, the torso set might be 35, so the torso is set to the leg's y-rotation plus 35 degrees. Or -22, leg's y-rotation minus 22 degrees etc.
How would I achieve this through javascript? Admittedly my only experience is Scirra Construct, essentially easy mode I suppose, where I could just set the torso's angle to MechLegs.Angle + TorsoSet haha.
Your answer
Follow this Question
Related Questions
Help with rotation clamping relative to another object 0 Answers
turret not facing correct rotation 3 Answers
Applying a rotation relative to the object's starting rotation 0 Answers
normalize two angles, then modify the result? 0 Answers
Help with Enter/Exit modified for a turret or cannon in C# 1 Answer