Skip to main content

Headset Calibration API Reference (Unity)

The public C# API of AR 51 Headset Calibration, namespace AR51.HeadsetCalibration. 3.0.302

For usage, see the Developer guide. For the core SDK types, see the Unity SDK API reference.

HeadsetCalibrator​

class Unity component
namespace AR51.HeadsetCalibration;

public class HeadsetCalibrator : MonoBehaviour

Lines up the headset's world with the AR 51 capture space, automatically and continuously.

MemberTypeDescription
RigRootTransform (field)The object that gets lined up. Empty = root of the main camera.
SmoothingSecondsfloat (field)How gently later corrections are applied (seconds).
StateCalibrationState (get)How well the headset's world lines up right now.
HintCalibrationHint (get)What the wearer can do right now; None when nothing.
HasSolutionbool (get)true once the headset has been aligned at least once.
HeadsetTrackedbool (get)The headset reports a valid pose this frame.
HeadsetMountedbool (get)The headset is on a head (true when the device doesn't say).
SkeletonIdstring (get)The wearer's tracked person, or null while finding them.

Events​

EventTypeRaised when
StateChangedevent Action<CalibrationState, CalibrationState>The state changes — with the previous and the new state.
HintChangedevent Action<CalibrationHint>The hint changes.

Methods​

MethodDescription
ResetCalibration()Start fresh (e.g. a new wearer). The view stays where it is until the new alignment is ready.

CalibrationHintPanel​

class Unity component
namespace AR51.HeadsetCalibration;

public class CalibrationHintPanel : MonoBehaviour

Optional in-headset panel that shows the calibrator's hint. Its fields match the Settings reference.

HintTexts​

class · nested · serializable

The message shown for each hint.

MemberTypeDescription
StepIntoView · HeadsetTrackingLost · FindingYou · HoldStill · KeepWalking · AlignedstringThe text for each hint, plus the "aligned" confirmation.
For(CalibrationHint hint)stringReturns the text for a hint.

CalibrationState​

enum
ValueMeaning
NotAlignedNot lined up yet; the view hasn't been moved.
AligningRoughly lined up; a few steps of walking make it precise.
AlignedLined up; corrections from now on are small and smooth.
LostWas lined up but can't follow right now (e.g. the headset lost tracking); the view stays until it recovers.

CalibrationHint​

enum
ValueMeaningDefault panel text
NoneNothing to do.—
StepIntoViewThe cameras see nobody.Step into the capture area so the cameras can see you.
HeadsetTrackingLostThe headset lost its own tracking.Headset tracking lost. Make sure the room is well lit.
FindingYouThe wearer isn't recognised yet.Walk a few steps so the system can find you.
HoldStillNeeds a steady look for a moment.Hold still for a moment and look straight ahead.
KeepWalkingRoughly lined up; finishing.Walk a few more steps to finish aligning.
Was this page helpful?