DOLookAt Method
DOLookAt(Rigidbody, Vector3, float, AxisConstraint, Vector3?)
public static TweenerCore<Quaternion, Vector3, QuaternionOptions> DOLookAt(this Rigidbody target, Vector3 towards, float duration, AxisConstraint axisConstraint = null, Vector3? up = null)
Tweens a Rigidbody's rotation so that it will look towards the given position. Also stores the rigidbody as the tween's target so it can be used for filtered operations
Parameters
targetRigidbodytowardsVector3The position to look at
durationfloatThe duration of the tween
axisConstraintAxisConstraintEventual axis constraint for the rotation
upVector3?The vector that defines in which direction up is (default: Vector3.up)
Returns
- TweenerCore<Quaternion, Vector3, QuaternionOptions>