Skip to content
Snippets Groups Projects
Commit 0e8cae62 authored by Alifia Rahmah's avatar Alifia Rahmah
Browse files

fix(pet): find tag player from setup in PetMovement

parent 5e1abdaf
No related merge requests found
......@@ -8,10 +8,13 @@ public class PetMovement: MonoBehaviour
public Transform target;
protected NavMeshAgent nav;
Animator anim;
public float rotationSpeed = 10f;
void Awake()
{
GameObject player = GameObject.FindGameObjectWithTag("Player");
target = player.transform;
nav = GetComponent<NavMeshAgent>();
anim = GetComponent<Animator>();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment