- Home /
Move player in a cyclic path?
Hello All.. I am new to unity and c#.
I am trying to make my player move from one point to another . Now this I have achieved using the LERP function, but i wish to move the object in a cyclic path..
As in the player must move from Point A - Point B - Point C - Point D and back to Point A again..I tried achieving this through a simple for loop but in vain..
Please help..Thanke in advance.:)
Try Slerp ins$$anonymous$$d for a curved path, Lerp in an arc.
Simply change the 'to' field variable contents and reset the t to 0 to pick a new path. From field is normally transform.position or something like that anyway.
Show us some code, please. You could save an array of locations and then SLERP/LERP to the next one when the player reaches the previous location.
Your answer
![](https://koobas.hobune.stream/wayback/20220613120501im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Player Going through colliders 1 Answer
Orbit player around center point 1 Answer
Implement moveSpeed to this object script? 1 Answer
GUI movement Control. Please Help!!! Thanks 1 Answer
Making player move in an arc 0 Answers