You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//if (!newController.TryGetElement(trackedControllerElement, out elementTransform))
118
+
//{
119
+
// Debug.LogError("Unable to find element of type " + trackedControllerElement + " under controller " + newController.ControllerParent.name + "; not attaching.");
120
+
// return;
121
+
//}
122
+
123
+
ControllerTransform=newController.Transform;
124
+
125
+
//// Update ElementTransform for consumption
126
+
//ElementTransform = elementTransform;
127
+
128
+
OnControllerFound();
129
+
}
130
+
}
131
+
132
+
protectedvirtualvoidRemoveControllerTransform()
133
+
{
134
+
OnControllerLost();
135
+
136
+
ControllerTransform=null;
137
+
//ElementTransform = null;
138
+
}
139
+
140
+
protectedvirtualvoidRefreshControllerTransform()
141
+
{
142
+
if(ControllerTransform!=null)
143
+
{
144
+
RemoveControllerTransform();
145
+
}
146
+
147
+
TryAndAddControllerTransform();
148
+
}
149
+
150
+
/// <summary>
151
+
/// Override this method to act when the correct controller is actually found.
152
+
/// This provides similar functionality to overriding AddControllerTransform,
153
+
/// without the overhead of needing to check that handedness matches.
154
+
/// </summary>
155
+
protectedvirtualvoidOnControllerFound(){}
156
+
157
+
/// <summary>
158
+
/// Override this method to act when the correct controller is actually lost.
159
+
/// This provides similar functionality to overriding AddControllerTransform,
160
+
/// without the overhead of needing to check that handedness matches.
/// This class handles the solver components that are attached to this <see cref="GameObject"/>
13
13
/// </summary>
14
-
publicclassSolverHandler:MonoBehaviour
14
+
publicclassSolverHandler:ControllerFinder
15
15
{
16
16
[SerializeField]
17
17
[Tooltip("Tracked object to calculate position and orientation from. If you want to manually override and use a scene object, use the TransformTarget field.")]
0 commit comments