Skip to content

Commit 85bec97

Browse files
Alexander Seeckradicalad
authored andcommitted
localspace movement (#3627)
1 parent a61951b commit 85bec97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/MixedRealityToolkit.Services/InputSystem/GazeProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ public override void OnPreRaycast()
194194
// Update gaze info from stabilizer
195195
if (stabilizer != null)
196196
{
197-
stabilizer.UpdateStability(newGazeOrigin, gazeTransform.rotation);
198-
newGazeOrigin = stabilizer.StablePosition;
199-
newGazeNormal = stabilizer.StableRay.direction;
197+
stabilizer.UpdateStability(gazeTransform.localPosition, gazeTransform.localRotation * Vector3.forward);
198+
newGazeOrigin = gazeTransform.parent.TransformPoint(stabilizer.StablePosition);
199+
newGazeNormal = gazeTransform.parent.TransformDirection(stabilizer.StableRay.direction);
200200
}
201201

202202
Vector3 endPoint = newGazeOrigin + (newGazeNormal * pointerExtent);

0 commit comments

Comments
 (0)