File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Assets/HoloToolkit/Input/Scripts/Utilities/Interactions Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ private void Awake()
7878 InitialPosition = localPosition ;
7979 ControllerSourceState . SourcePose . Position = localPosition ;
8080 ControllerSourceState . SourcePose . Rotation = ControllerVisualizer . transform . rotation ;
81+ // we reuse localPosition here as we have no real way to source a grip position
82+ // in the Editor, other than an arbitrary offset
83+ ControllerSourceState . SourcePose . GripPosition = localPosition ;
84+ ControllerSourceState . SourcePose . GripRotation = ControllerVisualizer . transform . rotation ;
8185
8286 visualRenderer = ControllerVisualizer . GetComponent < Renderer > ( ) ;
8387 visualPropertyBlock = new MaterialPropertyBlock ( ) ;
@@ -170,6 +174,7 @@ private void Update()
170174
171175 localPosition += translate ;
172176 ControllerSourceState . SourcePose . Position = CameraCache . Main . transform . position + CameraCache . Main . transform . TransformVector ( localPosition ) ;
177+ ControllerSourceState . SourcePose . GripPosition = CameraCache . Main . transform . position + CameraCache . Main . transform . TransformVector ( localPosition ) ;
173178
174179 ControllerVisualizer . transform . position = ControllerSourceState . SourcePose . Position ;
175180 ControllerVisualizer . transform . forward = CameraCache . Main . transform . forward ;
You can’t perform that action at this time.
0 commit comments