Unity Game SDKv0.5.1Download SDK
RUEN

Hits and coordinates

The controller reports a physical point on the target surface. The SDK converts it to coordinates suitable for your scene.

VORIVOX target coordinates
The VORIVOX coordinate origin is the bottom-left corner.

VorivoxHit fields

FieldDescription
ShotIdUnique shot identifier within the session.
XMm, YMmPhysical coordinates in millimeters.
NormalizedX, NormalizedYValues from 0 to 1, with origin at bottom-left.
Sourcecontroller, mock, or diagnostic source.

Canvas UI

private void OnHit(VorivoxHit hit)
{
    Vector2 localPoint = hit.ToCanvasLocal(playfield);
    impactMarker.anchoredPosition = localPoint;
}

3D scene

For a rail shooter, use normalized coordinates as a camera viewport point:

Vector3 viewport = new(hit.NormalizedX, hit.NormalizedY, 0f);
Ray ray = gameplayCamera.ViewportPointToRay(viewport);

if (Physics.Raycast(ray, out RaycastHit info, 200f, hitMask))
{
    info.collider.GetComponent<IDamageable>()?.ApplyHit(info.point);
}

Letterboxing and active area

If the projector displays black bars, map hits to the actual active gameplay area. Do not calculate coordinates from Screen.width manually; use the playfield RectTransform or the SDK conversion helper.