Table of Contents

DORotate Method

Namespace
DG.Tweening

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

target Rigidbody
endValue Vector3

The end value to reach

duration float

The duration of the tween

mode RotateMode

Rotation mode

Returns

TweenerCore<Quaternion, Vector3, QuaternionOptions>