API reference
Every PadPlay type, member and setting on one page. Filter by name or meaning.
PadPlayGyroPointer
Point the phone at the screen like a remote and where it points becomes a point on screen, for crosshairs and menu cursors. Twisting the wrist does not move it.
PlayerSlot— Whose phone points, as a slot number. For two or more players, add one component per player.ViewportPosition— The point, 0 to 1 like the viewport (y = 0 at the bottom). (0.5, 0.5) is forward; it stops at the edges.IsPointing— Whether the last update read the phone's attitude. false with nobody on the slot, while reconnecting, or before the first attitude. Fade the cursor and cancel presses while false.GetRay— A ray from camera through the point, to hit 3D objects.GetScreenPosition— The point in screen pixels (origin at the bottom left).Reticle— Optional UI that follows the point: its anchors are set to the point within its parent.ResetForward— Makes the current pose the center for this pointer only (blends over Recenter Blend Ms). For the whole player, use host.Recenter.Settings.Axis— Which way of the phone points. DeviceTop: the short edge with the camera, like a remote (the same held flat or tilted). TopEdge: the display's top edge. Back: the back. Auto: chosen at each recenter (flat = top edge, upright = back).Settings.HorizontalRangeDegrees— How far to swing the phone to move the point edge to edge, left–right and bottom–top. Smaller = more sensitive.Settings.Reference— What becomes the center on recenter. Full: where the phone points now (both axes). Yaw: left–right only; level is the center height.Settings.Smoothing— Smoothing (0 to 0.99) and the blend time in ms after a recenter. Small shakes show on a pointer, so a stronger value than for the camera may suit it.Settings.FollowPadRecenter— FollowPadRecenter: follow the player's recenter. CalibrateOnConnect: recenter on join and resume. FollowScreenRotation: swinging right moves right in landscape too.TryGetForward— Keeps the point in place across scenes: read this pointer's forward with TryGetForward, keep it, and give it to the next scene's pointer with StartFrom before its first frame. ForwardCount changes with every new forward.