Class GamepadPose
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalGamepadPose interface of the Gamepad API represents the pose of a WebVR controller at a given timestamp (which includes orientation, position, velocity, and acceleration information).
[Value("GamepadPose")]
public class GamepadPose
- Inheritance
-
GamepadPose
- Inherited Members
Remarks
Constructors
GamepadPose()
public GamepadPose()
Properties
AngularAcceleration
NOTE
ExperimentalangularAcceleration read-only property of the GamepadPose interface returns an array representing the angular acceleration vector of the Gamepad, in meters per second per second.
[Value("angularAcceleration")]
public Float32Array? AngularAcceleration { get; }
Property Value
- Float32Array
A Float32Array, or
nullif the gamepad is not able to provide angular acceleration information.
Remarks
In other words, the current acceleration of the sensor's rotation around the x, y, and z axes.
AngularVelocity
NOTE
ExperimentalangularVelocity read-only property of the GamepadPose interface returns an array representing the angular velocity vector of the Gamepad, in radians per second.
[Value("angularVelocity")]
public Float32Array? AngularVelocity { get; }
Property Value
- Float32Array
A Float32Array, or
nullif the gamepad is not able to provide angular velocity information.
Remarks
In other words, the current velocity at which the sensor is rotating around the x, y, and z axes.
HasOrientation
NOTE
ExperimentalhasOrientation read-only property of the GamepadPose interface returns a boolean value stating whether the Gamepad can track and return orientation information.
[Value("hasOrientation")]
public bool HasOrientation { get; }
Property Value
- bool
A boolean value.
Remarks
HasPosition
NOTE
ExperimentalhasPosition read-only property of the GamepadPose interface returns a boolean value stating whether the Gamepad can track and return position information.
[Value("hasPosition")]
public bool HasPosition { get; }
Property Value
- bool
A boolean value.
Remarks
LinearAcceleration
NOTE
ExperimentallinearAcceleration read-only property of the GamepadPose interface returns an array representing the linear acceleration vector of the Gamepad, in meters per second per second.
[Value("linearAcceleration")]
public Float32Array? LinearAcceleration { get; }
Property Value
- Float32Array
A Float32Array, or
nullif the gamepad is not able to provide linear acceleration data.
Remarks
In other words, the current acceleration of the sensor, along the x, y, and z axes.
LinearVelocity
NOTE
ExperimentallinearVelocity read-only property of the GamepadPose interface returns an array representing the linear velocity vector of the Gamepad, in meters per second.
[Value("linearVelocity")]
public Float32Array? LinearVelocity { get; }
Property Value
- Float32Array
A Float32Array, or
nullif the gamepad is not able to provide linear velocity data.
Remarks
In other words, the current velocity at which the sensor is moving along the x, y, and z axes.
Orientation
NOTE
Experimentalorientation read-only property of the GamepadPose interface returns the orientation of the Gamepad, as a quaternion value.
[Value("orientation")]
public Float32Array? Orientation { get; }
Property Value
- Float32Array
A Float32Array, or
nullif the VR sensor is not able to provide orientation data.
Remarks
The value is a Float32Array, made up of the following values:
The orientation yaw (rotation around the y axis) is relative to the initial yaw of the sensor when it was first read.
Position
NOTE
Experimentalposition read-only property of the GamepadPose interface returns the position of the Gamepad as a 3D vector.
[Value("position")]
public Float32Array? Position { get; }
Property Value
- Float32Array
A Float32Array, or
nullif the gamepad is not able to provide position data.NOTE
User agents may provide emulated position values through certain techniques; when doing so they should still report HasPosition as false.
Remarks
The coordinate system is as follows:
Positions are measured in meters from an origin point — this point is the position the sensor was first read at.