Contents

look(at:up:localFront:)

Changes the node’s orientation so that the specified forward vector points toward the specified location.

Declaration

func look(at worldTarget: SCNVector3, up worldUp: SCNVector3, localFront: SCNVector3)

Parameters

  • worldTarget:

    The point, in world space, to face the node toward.

  • worldUp:

    The direction vector, in world space, that should appear as “up” from the rotated node’s point of view.

  • localFront:

    The direction vector, in the node’s local space, that should orient toward the target point.

Discussion

The effects of this method are animatable; that is, calling this method during an implicit-animation transaction animates the rotation effect. (See Animating SceneKit Content.)

See Also

Related Documentation

Performing Node-Relative Operations (SceneKit Types)