MixedRealityToolkit-Unity
MixedRealityToolkit-Unity copied to clipboard
Null reference exception when clicking on manipulation handler with gaze pointer
Steps to reproduce the behavior:
- Open HandInteractionExamples scene
- Play scene with an Xbox controller connected
- Look at an object with a manipulation handler and press the A button in the controller
- Observe following error:
NullReferenceException: Object reference not set to an instance of an object
Microsoft.MixedReality.Toolkit.UI.ManipulationHandler.GetPointersVelocity () (at Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/ManipulationHandler.cs:232)
This is happening because manipulation handler assumes that all pointers have a valid controller, which is not the case for the gaze pointer.
You're right, not all pointers have controllers, but they all do have valid InputSources
Fixed by #4118