Table of Contents

DOMove Method

Namespace
DG.Tweening

DOMove(Rigidbody2D, Vector2, float, bool)

public static TweenerCore<Vector2, Vector2, VectorOptions> DOMove(this Rigidbody2D target, Vector2 endValue, float duration, bool snapping = false)

Tweens a Rigidbody2D's position to the given value. Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations

Parameters

target Rigidbody2D
endValue Vector2

The end value to reach

duration float

The duration of the tween

snapping bool

If TRUE the tween will smoothly snap all values to integers

Returns

TweenerCore<Vector2, Vector2, VectorOptions>