Skip to main content

ControllerOffsetSettings

A class in Root.Township, the global namespace.

Scriptable object with per-platform transform offsets for each VR controller hand.

Constructors​

MemberWhat it is
ControllerOffsetSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private PlatformHandAlignment[] leftHandAlignmentPer-platform offsets for the left hand.
private static Logger loggerNLog logger for this class.
private PlatformHandAlignment[] rightHandAlignmentPer-platform offsets for the right hand.

Methods​

MemberWhat it is
SerializableTransform GetControllerOffsetForHand(Hand hand, PlayerMode playerMode)Returns the hand's offset for the player mode. OpenVR falls back to the OpenXR entry; otherwise an identity transform with an error log.
2 private and internal methods
MemberWhat it is
private PlatformHandAlignment[] GetHandAlignmentsForHandIndex(HandIndex handIndex)Returns the left or right alignment list. Logs an error and returns null for both hands.
private static bool OffsetIsOpenXr(PlatformHandAlignment handRotation)True if the alignment entry is for OpenXR.

Used in​

Members of other types that take, return or hold a ControllerOffsetSettings: