@urth/metatell-sdk - v0.1.0
    Preparing search index...

    Function setMovementEnabled

    • 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

      • 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.
      import { setMovementEnabled } from "@urth/metatell-sdk/user";

      // when the game starts
      setMovementEnabled(false);

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