Joystick

Adds an on-screen joystick that you drag to move or steer something in the Lens. Choose where it sits, how big it is, and how it looks.

Games & Interactivity

Game engines, physics, quizzes, leaderboards, and the UI controls that tie it together.

Made with this block

Inputs

positionvec2

Center anchor in Screen Transform Space (-1.0 to 1.0). - Center: [0, 0] - Bottom-Left corner: [-1, -1] - Top-Right corner: [1, 1]

sizefloat

Dimensions in screen space units (Total screen width/height range is 2.0). - Small: 0.4 - Medium (Standard): 0.65 - Large: 0.8

visualPresetint

Defines the visual appearance. Note: Can only be set at creation time; cannot be changed dynamically. - 0: Concave style. - 1: Convex style. - 2: Minimalist style.

freePlacementboolean

When enabled, the joystick spawns at the player's touch point and follows their thumb instead of staying pinned at a fixed screen position

Events

directionUpdateEvent

An event that is triggered when the joystick's direction changes. The event payload is a vec2 representing the direction, normalized to be with magnitude between 0 and 1 (smooth)