Turret rotation towards a Widget,Making a Game Object rotate towards a widget
i got a turret script and i cannot work the bugs out of it for the life of me
https://hatebin.com/dqzuqqsqdn
it has a widget(directly controlled by mouse)
,a turret and it gets commands to rotate a joint motor based on the difference between the rotation of the 2 gameobjects
i use eulerAngles now to define rotation data and if it gets to the 0,360 mark
it sees a huge difference in the rotation because it sees that the widget is on the opposite end of the rotation scale
What am i doing wrong?, i got a turret script and i cannot work the bugs out of it for the life of me
https://hatebin.com/dqzuqqsqdn
it has a widget thats cotrolled directly by the mouse and a turret that has a joint and a motor that gets commands based on the difference between the rotation of the widget and the turret.
i use eulerAngles now to define rotation data and if it gets to the 0,360 it suddenly detects huge difference because it sees that the widget is on the opposite end of the rotation scale
what am i doing wrong?
Your answer
Follow this Question
Related Questions
Smooth rotation on Y axis to target pose 0 Answers
Problem with Quaternion and Euler Angles 0 Answers
MathF clamp look toward mouse pointer not working correctly 0 Answers
Rotate object in specific direction 0 Answers
Camera Rotation and Re-rotation 0 Answers