2

I'm trying to use UI/Slider in Unity app for HoloLens. I used the steps described here - Unity UI on the HoloLens

So as a result I have following structure:

enter image description here

MainCamera properties:

enter image description here

SliderCanvas is using MainCamera:

enter image description here

Slider properties:

enter image description here

InteractiveMeshCursor is taken from HoloToolkit.

As a result I'm getting this picture:

enter image description here

When I move the head the Cursor behaves correctly - it stays in the middle of the scene. If I add other 3D objects on the Scene it also correctly changes its states so GazeManager looks like is working correctly.

However I cannot gaze at Slider because it moves with the Camera too and stays in the bottom/center of the scene where I want it to be. So in my case there is no way for them to intersect.

How can I fix this? Do I need to add an other Camera for the SliderCanvas but then how to control both cameras? I am definitely missing something and would appreciate your help.

Kate
  • 69
  • 6

1 Answers1

1

As expected the solution turned out to be simple (I missed one step from the tutorial). For UI objects you need to set Render Mode property for the Canvas to World Space and changed the Position and Scale of the Slider. Now the Gaze is working.

SliderCanvas properties:

enter image description here

Slider properties:

enter image description here

Kate
  • 69
  • 6