hi!
i use this code for a gameobject to follow the player when hit:
hitobject.transform.LookAt(gameObject.transform);
hitobject.transform.Translate(forwardforceVector3.forwardTime.deltaTime);
the gameobject is animated, but the animation stops forever as soon as it follows the player and is out of screen. it is still playing the animation if it is following the player and still on screen. i do not have coded that the animation should stop, when it is out of screen.
does anybody know why?
thank you!