Table of Contents

Class GamepadPose

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The GamepadPose 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

This interface is accessible through the Pose property.

-WebVR API
-Gamepad API

See also on MDN

Constructors

GamepadPose()

public GamepadPose()

Properties

AngularAcceleration

NOTE
Experimental
The angularAcceleration 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 null if 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.

-WebVR API
-Gamepad API

See also on MDN

AngularVelocity

NOTE
Experimental
The angularVelocity 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 null if 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.

-WebVR API
-Gamepad API

See also on MDN

HasOrientation

NOTE
Experimental
The hasOrientation 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
Experimental
The hasPosition 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
Experimental
The linearAcceleration 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 null if 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.

-WebVR API
-Gamepad API

See also on MDN

LinearVelocity

NOTE
Experimental
The linearVelocity 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 null if 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.

-WebVR API
-Gamepad API

See also on MDN

Orientation

NOTE
Experimental
The orientation 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 null if 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.

-WebVR API
-Gamepad API

See also on MDN

Position

NOTE
Experimental
The position 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 null if 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.

-WebVR API
-Gamepad API

See also on MDN