Defines an interface for bridging various input methods into a unified control scheme.
The PlayerControllerInput serves as an abstraction layer that enables an application to
process input data from different sources such as keyboards, game controllers,
and VR controllers in a consistent manner. Implementations of this interface should
provide mechanisms to interpret and translate these diverse inputs into a set
of standardized movement and rotation vectors that the application can easily use
for navigation and interaction within a 3D environment.
/** @override */ getRotationAxis(out: vec3) { // Always rotate by 10 degrees around the. You can input your own values here, // coming from a keyboard, the network, etc... out[1] = 10; returnout; }
/** @override */ getMovementAxis(out: vec3) { // Always move to the right. You can input your own values here, // coming from a keyboard, the network, etc... out[0] = 1; returnout; } }
Defines an interface for bridging various input methods into a unified control scheme.
The
PlayerControllerInputserves as an abstraction layer that enables an application to process input data from different sources such as keyboards, game controllers, and VR controllers in a consistent manner. Implementations of this interface should provide mechanisms to interpret and translate these diverse inputs into a set of standardized movement and rotation vectors that the application can easily use for navigation and interaction within a 3D environment.Example