Instance Method

simdLookAt:up:localFront:

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

Declaration

- (void)simdLookAt:(simd_float3)worldTarget up:(simd_float3)worldUp localFront:(simd_float3)localFront;

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

Performing Node-Relative Operations

- simdRotateBy:aroundTarget:

Changes the node's position and orientation, relative to its current transform, through a rotation around the specified point in scene space.

- simdLocalTranslateBy:

Changes the node's position relative to its current position.

- simdLocalRotateBy:

Changes the node's orientation relative to its current orientation.

- simdLookAt:

Changes the node's orientation so that its local forward vector points toward the specified location.