Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Javascript Script for Object Follow?

$
0
0
I have a simple script for object follow so I can have an enemy follow the player. This is my script: Vector3( direction = player.position - transform.position ); direction.Normalize(); transform.position += direction * speed * Time.deltaTime; The error is that "direction" is an unexpected token. How can I fix this? It's worth noting that the object is an animate ragdoll, however I don't want to play a separate animation for walking. I just want it to follow the player.

Viewing all articles
Browse latest Browse all 7934

Latest Images

Trending Articles



Latest Images