VRDirection
@objc(THEOplayerVRDirection)
public class VRDirection : NSObject
The direction the user is facing.
-
The rotational pitch value in the range of -180 to 180.
Remark
The pitch axis is the axis going through both cheeks. Looking up and down affects the pitch value.Declaration
Swift
@objc public var pitch: Double
-
The rotational roll value in the range of -180 to 180.
Remark
The roll axis is the axis going through nose and back of the head. Tilting head left and right affects the roll value.Declaration
Swift
@objc public var roll: Double
-
The rotational yaw value in the range of -180 to 180.
Remark
The yaw axis is the axis going through chin and scalp. Looking left and right affects the yaw value.Declaration
Swift
@objc public var yaw: Double
-
Construct a VRDirection object to set to the
player.vr.direction
property.Declaration
Swift
public init(pitch: Double? = 0, roll: Double? = 0, yaw: Double? = 0)
Parameters
pitch
The rotational pitch value in the range of -180 to 180.
roll
The rotational roll value in the range of -180 to 180.
yaw
The rotational yaw value in the range of -180 to 180.