Wearable Only
Enum for describing the motion type.
const MotionControllerModule = require('LensStudio:MotionControllerModule');let options = MotionController.Options.create();options.motionType = MotionController.MotionType.SixDoF;const motionController = MotionControllerModule.getController(options);const sceneObject = script.getSceneObject();const transform = sceneObject.getTransform();motionController.onTransformEvent.add((worldPosition, worldRotation) => { transform.setWorldPosition(worldPosition); transform.setWorldRotation(worldRotation);}); Copy
const MotionControllerModule = require('LensStudio:MotionControllerModule');let options = MotionController.Options.create();options.motionType = MotionController.MotionType.SixDoF;const motionController = MotionControllerModule.getController(options);const sceneObject = script.getSceneObject();const transform = sceneObject.getTransform();motionController.onTransformEvent.add((worldPosition, worldRotation) => { transform.setWorldPosition(worldPosition); transform.setWorldRotation(worldRotation);});
Transform of this object does not change.
Both position and rotation of the object are changed.
Only the rotation of the object is changed.
Enum for describing the motion type.
Example