DORotate Method
DORotate(Rigidbody, Vector3, float, RotateMode)
public static TweenerCore<Quaternion, Vector3, QuaternionOptions> DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = null)
Tweens a Rigidbody's rotation to the given value. Also stores the rigidbody as the tween's target so it can be used for filtered operations
Parameters
targetRigidbodyendValueVector3The end value to reach
durationfloatThe duration of the tween
modeRotateModeRotation mode
Returns
- TweenerCore<Quaternion, Vector3, QuaternionOptions>