Aim with the gyro and shoot
A crosshair follows the phone; press A to shoot.
Video: Aim with the gyro and shoot (2:32)
Add Component → PadPlay → Gyro Pointer
Set a UI Image as the Reticle
Add the GyroShooter script below to the same GameObject
using PadPlay;
using UnityEngine;
public class GyroShooter : MonoBehaviour
{
[SerializeField] PadPlayHost host;
[SerializeField] PadPlayGyroPointer pointer;
[SerializeField] Camera cam;
void Update()
{
PadPlayPad pad = host.GetPad(pointer.PlayerSlot);
if (pad == null || !pointer.IsPointing)
return;
if (!pad.buttonSouth.wasPressedThisFrame)
return;
if (Physics.Raycast(pointer.GetRay(cam), out RaycastHit hit))
host.Pulse(pointer.PlayerSlot, 80); // hit: short buzz
}
}Point the top edge of the phone at the screen and the crosshair moves. If it drifts, long-press the top-left corner of the phone for a second.