Hi,
I have the following code, which updates my game object position:
void FixedUpdate()
{
rb.MovePosition (transform.position + (heading * Time.deltaTime * 2));
}
It works well, but if I try to make my object rotate to face another object, then the object will move a much smaller distance on each update. This is how I’m rotating to face the other object:
void Update () {
if(target != null) {
transform.LookAt(target);
}
}
Does anyone knows why this happens, and how can I fix it?
Thanks