Function requestPointerLock

  • request for the pointer to be locked on the parent DOM element. (Must be called in a click event or an event that requires user interaction)

    Returns boolean

    return true if the request was successfully submitted

    input

    // register on the pointer lock change event
    event.on(event.POINTERLOCKCHANGE, (locked)=> {
    console.log("pointer lock: " + locked);
    });
    // request for pointer lock
    me.input.requestPointerLock();