• Enable or disable the current user's movement.

    Passing false blocks translational movement (WASD / joystick), which is useful, for example, to stop the player from walking around while a game is in progress.

    Parameters

    • enabled: boolean

      true allows movement, false blocks it.

    Returns void

    Remarks

    • Only translational movement is affected. Snap rotation, teleport (waypoints) and fly are NOT blocked.
    • Internally this updates a persistent preference (the same disableMovement value as the settings screen). It does NOT reset on its own, so the plugin MUST call setMovementEnabled(true) during teardown. Otherwise the user stays unable to move after the plugin closes.

    Example

    import { setMovementEnabled } from "@urth/metatell-sdk/user";

    // when the game starts
    setMovementEnabled(false);

    // when the game ends / the plugin is destroyed
    setMovementEnabled(true);