reedv / 3D-Holo-Golf

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

cursor sometimes ends up behind ball after ball is reset, leaving ball unable to be gazed at #10

Closed reedv closed 7 years ago

reedv commented 7 years ago

Current workaround seems to be using voice command "Toggle Mesh" to turn off spatial mesh and voice command "Reset Ball" can get the cursor looking back at the ball.

reedv commented 7 years ago

Decreased min cursor distance from 1 to 0.45 to try to fix cursor-not-on-ball bug. The idea being that maybe the cursor needs to have a min. distance < forwardOffset of the projectile. This seems to have fixed the problem.

reedv commented 7 years ago

try reseting the cursor position as well whenever you reset the ball

reedv commented 7 years ago

In the associated projectile's ProjectileShooter component, resetting the cursor position back to its min distance in front of camera in the direction of the normalized camera.transform.forward seems to work (the actual reset value should not matter since I think the cursor gets put back in front of camera gaze OnUpdate() for each frame).