Type Method

moveTo:duration:

Creates an action that moves a node to a new position.

Declaration

+ (SCNAction *)moveTo:(SCNVector3)location duration:(NSTimeInterval)duration;

Parameters

location

The coordinates for the node’s new position in its parent node’s local coordinate space.

duration

The duration, in seconds, of the animation.

Return Value

A new action object.

Discussion

When the action executes, the node’s position property animates from its current position to its new position.

This action is not reversible; the reverse of this action has the same duration but does not move the node.

See Also

Creating Actions That Move a Node

+ moveByX:y:z:duration:

Creates an action that moves a node relative to its current position.

+ moveBy:duration:

Creates an action that moves a node relative to its current position.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software