Working with the Cursor

Working with the Cursor

Topic Progress:

Working with the Cursor

The Cursor is always in the Camera Tag:

<a-camera zoom="0.5" user-height="0">
   <a-cursor></a-cursor>
</a-camera>

By default, it is a small black ring. It can be changed with geometry and material:

<a-camera zoom="0.5" user-height="0">
  <a-cursor
    geometry="primitive: ring; radius-outer: 0.05; radius-inner: 0.01;"
    material="color: red"
  ></a-cursor>
</a-camera>

Normally the cursor reacts to a click, it is also possible to change this. If we set the cursor to be fuse-based, the cursor will trigger a click if the user gazes at an entity for a set amount of time:

<a-camera zoom="0.5" user-height="0">
  <a-cursor
    cursor="fuse: true; fuseTimeout: 1500"
    geometry="primitive: ring; radius-outer: 0.05; radius-inner: 0.01;"
    material="color: red"
  ></a-cursor>
</a-camera>

After looking (or placing in the browser) with the cursor to an object for 1500 Milliseconds (1.5 Seconds) an possible action can be triggered. This can be done with a click Event (it does not work with a mouseenter).

Comments are closed.