MCPcopy
hub / github.com/mrdoob/three.js / moveRight

Method moveRight

examples/jsm/controls/PointerLockControls.js:183–193  ·  view source on GitHub ↗

* Moves the camera sidewards parallel to the xz-plane. * * @param {number} distance - The signed distance.

( distance )

Source from the content-addressed store, hash-verified

181 * @param {number} distance - The signed distance.
182 */
183 moveRight( distance ) {
184
185 if ( this.enabled === false ) return;
186
187 const camera = this.object;
188
189 _vector.setFromMatrixColumn( camera.matrix, 0 );
190
191 camera.position.addScaledVector( _vector, distance );
192
193 }
194
195 /**
196 * Activates the pointer lock.

Callers

nothing calls this directly

Calls 2

setFromMatrixColumnMethod · 0.80
addScaledVectorMethod · 0.45

Tested by

no test coverage detected