FaceTarget Rotation

Are we adding more functionalities to this Method in the near future, or what are the benefits of using Quaternion.LookRotation() instead of stateMachine.transform.LookAt ?

I’ve used the LookAt method and it seems to work fine.

    protected void FaceTarget()
    {
        if (stateMachine.Targeter.CurrentTarget==null) {return;}
        stateMachine.transform.LookAt(stateMachine.Targeter.CurrentTarget.transform);
    }

Is it safe to assume we don’t use LookAt because of this issue?
Ex: the whole parent object is rotated based on the Y position of the object?

1 Like

Yes as this avoids the need to clamp the value in LookRotation in this example to prevent this type of issue.

Well done working it out

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms