void createTransform(ref StaticOffsetTransform t, string name)
 {
     if (t == null)
     {
         t = new GameObject(name).AddComponent <StaticOffsetTransform>();
         t.transform.parent = transform;
         setStaticOffsetSettings(t);
     }
 }
 void setStaticOffsetSettings(StaticOffsetTransform s)
 {
     s.referenceLocalPosition = false;
     s.referenceLocalRotation = false;
     s.applyLocalPosition     = true;
     s.applyLocalRotation     = true;
     s.applyPosition          = true;
     s.applyRotation          = true;
     s.applyForwardOffsetAfterRotationOffset = false;
 }
        void connectTransforms()
        {
            StaticOffsetTransform sot = this.GetOrAddComponent <StaticOffsetTransform>();

            if (sot.reference == null)
            {
                sot.reference = transform.parent;
            }

            head.reference     = head.reference != null ? head.reference : PoseManager.Instance.vrTransforms.head;
            hmd.reference      = hmd.reference != null ? hmd.reference : PoseManager.Instance.vrTransforms.hmd;
            leftHand.reference = leftHand.reference != null
                                ? leftHand.reference
                                : PoseManager.Instance.vrTransforms.leftHand;
            rightHand.reference = rightHand.reference != null
                                ? rightHand.reference
                                : PoseManager.Instance.vrTransforms.rightHand;
        }