Javascript Script for Object Follow?
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.
Your answer
Follow this Question
Related Questions
Move Character to touched Position 2D (Without RigidBody and Animated Movement) 1 Answer
Javascript error 1 Answer
How to disable diagonal Vector3 movement of non-player object using MoveTowards? 1 Answer
How to move an Object in a path? 0 Answers
How to create Curve between two points using **Vector3.MoveTowards**? 0 Answers