- Home /
Question by
Juressic · Apr 08 at 02:15 PM ·
follow player
How to make enemies chasing player with personal space?
Hi,
I'm trying to make enemies chase a player with the lerp function, but all of them end up in the same place at the end. What is the best way to make them look like a crowd gravitating to the same point?
This is my simple code, i don't have any other idea at the moment:
transform.position = Vector3.Lerp(transform.position, player.position, 1.5f * Time.deltaTime);
Comment