- Home /
Lock rotation in specific angles
Hi, I want to let user rotate stick on right and left. Now I'm using RotateAround where camera is center of rotation, but I feel it's not most efficient idea. Additionaly it's quite buggy.
Is the second image the wrong or the correct position once rotated? It might seem wrong but it also can be right based on the length of the stick and pivot position.
It's current max stick inclination. Effect is correct.
As far as i know, you can either use the method you mentioned, and the bugs might be because of incorrect use, or make your own. The RotateAround should be using $$anonymous$$al computation to do the 2 things you require : rotate the target by N degrees, and move it to $$anonymous$$ position. Alternatively, you can use Translate + LookAt, but you would still need to calculate the new position of the object.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
ECS - System seems to only affect transform on first frame 1 Answer
Pointing object at mouse using raycast only works when object is center screen. 2 Answers
How can I pitch and roll a circular platform without releasing vertical/horizontal input? 1 Answer
What´s wrong with my rotation function? 0 Answers