GamepadControls

altspace/utilities/behaviors. GamepadControls

Allows an object to be moved, rotated, and scaled using a gamepad controller. Left stick left / right and up / down moves object in the X-Y plane. Clicking left stick enters left alt mode, where movement is in X-Z plane. Clicking left stick again exits left alt mode. Right stick left / right rotates object clockwise / counterclockwise (y axis). Right stick up / down rotates object away forwards / backwards (x axis). Clicking right stick enters right alt mode, where left / right tumbles object (z axis). Clicking right stick again exits right alt mode. D-pad up / down scales object. Back / reset button resets object to its original position and rotation.

Constructor

new GamepadControls()

Parameters:
Name Type Attributes Default Description
config.position Boolean <optional>
true

Whether object's position can be changed.

config.rotation Boolean <optional>
true

Whether object's rotation can be changed.

config.scale Boolean <optional>
true

Whether object's scale can be changed.

Extends

Members

type :string

The string name of this class. This is used for THREE.Object3D#getBehaviorByType.

Overrides:

Methods