0

Based on this repo https://github.com/qian256/ur5_unity. I am trying to get this working with some modifications, as I need. You can also see the issue in this repo.

I am unable to get the sliders move when I deploy it in the Hololens. I have a cursor that can gaze over the robot body but doesn't gaze on the slider bar or handle. I have tried most of the suggestions online including setting canvas to world-space.

I have already tried this out: HoloLens - UI/Slider and Cursor do not intersect during gaze

Mike G
  • 4,232
  • 9
  • 40
  • 66

3 Answers3

1

Without knowing more, if you can debug, set a breakpoint, and try to determine which object is being hit by your raycast, If it is an object behind your slider, then you need to adjust the layer of your slider object to be the top most layer and not shared by other game objects. If it is your slider, you might try and use the pinch and hold event, and detect which direction the user is pulling and then adjust the slider value manually.

Kelso Sharp
  • 972
  • 8
  • 12
0

The gaze would use Physics.Raycast thereby a Collider is required to gaze at somethiing. You can set quad primitives into your UI (with Canvas set to World Space with proper camera) by removing the MeshRenderer component but keeping the Collider one. You would then need to handle yourself gaze events for your UI e.g. gazing upper side of quad, you would manually move the slider up, etc.

RCYR
  • 1,452
  • 13
  • 28
0

Don't have 50 rep otherwise I would have commented but, I answered a very similar question here dealing with if your cursor goes through your UI element.

In the canvas I loose the cursor

However, if the problem is just that you can't move the cursor then, you need to make sure you have subscribed to the scroll/manipulation events for your cursor. You can test this to see if this is the case by just clicking on the slider in a different spot and the slider should jump to the spot you clicked.

Dtb49
  • 1,211
  • 2
  • 19
  • 48