Skip to content

Commit 09be398

Browse files
committed
fix(Locomotion): force controller listener setup on destination points
The destination point script now forces the controller listener registration in the OnEnable to ensure that if the controller is not on prior to running the scene then the listeners are still registered. This fixes an issue where the destination points would not work if the controllers were off at the point of starting the scene.
1 parent baf64a6 commit 09be398

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Assets/VRTK/Prefabs/Resources/Scripts/VRTK_DestinationPoint.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ private IEnumerator ManageDestinationMarkersAtEndOfFrame()
131131

132132
protected virtual void ManageDestinationMarkers(bool state)
133133
{
134+
ManageDestinationMarkerListeners(VRTK_DeviceFinder.GetControllerLeftHand(), state);
135+
ManageDestinationMarkerListeners(VRTK_DeviceFinder.GetControllerRightHand(), state);
136+
134137
foreach (var destinationMarker in VRTK_ObjectCache.registeredDestinationMarkers)
135138
{
136139
ManageDestinationMarkerListeners(destinationMarker.gameObject, state);

0 commit comments

Comments
 (0)