My plan is that a gameobject with a rigidbody attached to it should follow a target object.
In my script the gameobject does follow the target but it doesn't look smooth.
Is there any other way to make a rigidbody smoothly follow a gameobject?
I tried using Vector3.MoveTowards and it looks better but the object doesn't collide with other objects.
Thats not what I need.
private void FixedUpdate()
{
if (isCarrying == true)
{
Vector3 target = followTarget.transform.position;
currentItem.GetComponent().MovePosition(target);
}
}
↧