Skip to main content

Move

Description:

  Creates a definition for an action that animates the position of a Node from one Vec2 value to another.

Signature:

Move: function(
duration: number,
from: Vec2,
to: Vec2,
easing?: Ease.EaseFunc --[[Ease.Linear]]
): ActionDef

Parameters:

ParameterTypeDescription
durationnumberThe duration of the animation in seconds.
fromVec2The starting position of the Node.
toVec2The ending position of the Node.
easingEaseFunc[optional] The easing function to use for the animation. Defaults to Ease.Linear if not specified.

Returns:

Return TypeDescription
ActionDefAn ActionDef object that can be used to run the animation on a Node.