Lens Scripting API

    Enumeration MotionTypeWearable 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);
    });
    Index

    Enumeration Members

    Enumeration Members

    NoMotion: number

    Transform of this object does not change.

    SixDoF: number

    Both position and rotation of the object are changed.

    ThreeDoF: number

    Only the rotation of the object is changed.

    MMNEPVFCICPMFPCPTTAAATR