Before using LERP the enemy was jumping from tile to tile just fine. After I added the LERP, the enemy doesn’t move at all. I have used Debug.Log and the travel percent as well as the start and end position change normally. I have tried both scene and game view.
Please help.
Yeah your code looks like it’ll just sit there. Is there something that’s supposed to increase your travelPercent? If not, I’d start there if I were you.
travelPercent += Time.deltaTime; is the line that increases the travelPercent. Exactly as shown in the video. Also you can see it changing in the first attached image
hmm… I think I see it now… If I’m reading this right… (it’s the problem with posting code as an image, it’s annoyingly small and hard to copy/paste). Your startPosition and endPosition is the same point. I doubt this is what you’re trying to accomplish?
Oh my god it is. I have read the code like 5 times and it didn’t cross my mind. I was mindlessly looking at it. Thank you very much
No worries. Change the end point to the waypoint.transform.position and you should get more of what you expected.
Yup, just did and it works, thanks again
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.