Contents

setOrientation(_:duration:relative:)

Sets the position of each axis of orientation to radians for pitch, yaw, and roll.

Declaration

final func setOrientation(_ rotation: Rotation3D, duration: Duration = .seconds(0), relative: Bool = false) throws -> Progress

Parameters

  • rotation:

    The spatial framework’s Rotation3D with X, Y, and Z corresponding to radians of pitch, yaw, and roll axes.

  • duration:

    The duration, in seconds, to reach the target orientation.

  • relative:

    Calculate the relative-to-current positions, if set to true; otherwise, move to an absolute position.

Mentioned in

Return Value

A progress object that reports the progress towards the target orientation.

Discussion

This method works only when you disable system tracking.

See Also

Setting position and limits