Quantcast
Channel: Answers for "Turret Rotation on a moving object with rotation limits"
Viewing all articles
Browse latest Browse all 6

Answer by Epitaph778

$
0
0
After attempting the solutions in the answers provided, I eventually came upon a working solution. Since the code was functional for turn movement and pitch movement individually, I calculated the proper quaternions for the movement within the boundaries, then converted portions of these quaternions to vector3s of euler angles and used quaternion.euler to rotate: Vector3 rot = new Vector3(pitchQuat.eulerAngles.x, turnQuat.rotation.eulerAngles.y, pitchQuat.rotation.eulerAngles.z); transform.rotation = Quaternion.Euler(rot); Thanks for all the responses everyone!

Viewing all articles
Browse latest Browse all 6

Trending Articles