I want this ball to follow me(Its my weapon), but its very slowly… i can increase speed but rotation will be very fast and it will be horrible.
how can i make the ball teleporting to me when i am running/jump… ?
//The transform of your pet
public Transform ball;
//The radius
public int radiusCheck = 5;
void Update () {
//If the pet is greater than the radius away from the player
if (Vector2.Distance(transform.position, ball.transform.position) > radiusCheck)
{
//Teleport the ball to the player
ball.transform.position = transform.position;
}
}