simdLook(at:up:localFront:)
Changes the node’s orientation so that the specified forward vector points toward the specified location.
Declaration
func simdLook(at worldTarget: simd_float3, up worldUp: simd_float3, localFront: simd_float3)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.)