- Home /
Making a Lerp + Collisions waypoint system?
Is there a way to make an object Lerp from point to point while colliding into objects on the way and reacting like a regular CharacterController?
This is as my current waypoint system, which consists of making the character face the next waypoint and .SimpleMove towards it, until it reaches a particular distance (really tiny), is facing a dire problem where if there is too much lag, the character might end up spinning around the waypoint forever as it keeps overshooting the required distance. Thus, I thought that Lerping it from point to point would be a better idea, but that would mean that it would not collide with the terrain, something that I need...
Can anyone help me?
Answer by DaveA · Jan 17, 2011 at 08:13 AM
I had a similar problem. I now check that the character has reached the waypont 'near enough' by getting the magnitude of the difference between waypoint and character positions, and checking that for a small non-zero amount.
Ah, thats what I do. Although the issue is that when the game lags enough, your character will constantly "miss" the required distance, and thus will keep looping around the area...
Answer by GamezAtWork · Jan 19, 2011 at 01:39 AM
Does anyone have any ideas they can contribute? I'm kinda running desperate, its the one thing which I have been struggling with...
Your answer
![](https://koobas.hobune.stream/wayback/20220613095708im_/https://answers.unity.com/themes/thub/images/avi.jpg)