Does anyone know how to make a GameObject perfectly copy another GameObject’s position with AddForce? (MovePosition causes massive stuttering for some reason.)
This causes it to follow the original object with a delay, rather than exactly be on top of it.
private void FixedUpdate() {
rb.AddForce(targetTransform.transform.position - this.transform.position, ForceMode.Acceleration);
}
In case anyone’s curious, the stuttering MovePosition code is:
private void FixedUpdate()
{
rb.MovePosition(targetTransform.position);
rb.MoveRotation(targetTransform.rotation);
}
}
It causes the object to fly and blink around rapidly even though it’s the only Rigidbody in the scene and even if I choose ‘Interpolate’. Crazy stuff. So that’s why I’m trying to use AddForce instead…