reedv / 3D-Holo-Golf

Augmented reality beer pong with the Microsoft Hololens
0 stars 1 forks source link

PlayAndPass.scene:Player projectiles always HandDraggable #30

Open reedv opened 7 years ago

reedv commented 7 years ago

Even when not gazing at a projectile that has already been launched and is just sitting on the ground, using the tap-and-drag gesture moves the projectile around and fires the StoppedDragging event. I tested this bug in the PlayAnsPass scene.

reedv commented 7 years ago

This only seems to be a problem in the PlayAndPass.scene, the InitialTossing.scene looks to be fine.
Checking the HoloToolkit.Unity.InputModule.GazeManager.Instance.HitObject.name while looking away from projectile, shows that the gaze manager is apparently not focused on projectile when it can still be handdragged. Also, checking the HandDraggable.cs shows that OnEnterFocus() and OnExitFocus() methods are NOT being called for the component attached the the projectile, while dragging it when looking away from it. The StartedDragging() and StoppedDragging() event handlers in the ProjectileShooter.cs component are private and so I don't see how they would be getting called from anything other than the projectile th component is attached to.

reedv commented 7 years ago

Added some workaround logic in ProjectileShooter.cs The added workaround fits with the game design, but now has the detriment of hiding this bug. This should be OK for now, but the underlying problem is still a mystery to me. Leaving this issue open, just so that I don't forget that it exists underneath.