Quantcast
Viewing all articles
Browse latest Browse all 1488

Need help with AI in multiplayer

I'm working on a coop horror game. I attached this script to an enemy, so it will follow the player: var Player : Transform; var MoveSpeed = 4; var MaxDist = 10; var MinDist = 5; function Start () { } function Update () { transform.LookAt(Player); transform.position += transform.forward*MoveSpeed*Time.deltaTime; } Now the problem is: when I start the game and connect to the server, the enemy won't follow the player. Instead the enemy moves to the player's spawn. Does anyone know how to fix this? (Sorry if my English isn't that good, I'm Dutch)

Viewing all articles
Browse latest Browse all 1488

Trending Articles