- Home /
rotation around axis by degree smoothly for repeating random rotations
im new in unity and im trying make a basic game,and need to rotate my object 90 deg. but ı need to do this repeatly around random axis and ı wrote float ydonus = Mathf.MoveTowardsAngle(transform.eulerAngles.y, Y_targetdegree, speed * Time.deltaTime); transform.eulerAngles = new Vector3(0, ydonus, 0);
its working but frequently at start of turnig period my object is shaking itself and dont turnig after going on other periot . in log screen there is no wrong anything for turning parameter. changing targetdegree parameter for turnign, ı searched many thing about this and find this method. wrote all code dependet on this but dont working good. what should ı do, other methods or different things ? need help :( thanks for answers
Your answer
![](https://koobas.hobune.stream/wayback/20220612103813im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to pass a parameter only if certain condition is true? 1 Answer
Set up method parameter in Editor ? 2 Answers
why cant I see more than one perameter in gameobjects 1 Answer
Optional parameter, editor raises error "Unexpected symbol `=' " 0 Answers
Sequence of methods stored in the list with parameters 1 Answer