Search code examples
javascriptaframevirtual-reality

a-frame on mouse click cursor disappearing issue with aframe-extra version 3.8.6


I am using https://cdn.rawgit.com/donmccurdy/aframe-extras/v3.8.6/dist/aframe-extras.min.js aframe extra version 3.8.6 with aframe version 0.6.0 , on mouse clicked cursor is disappearing, need to pressed esc key everytime to get cursor back. can someone please help me into this issue.


Solution

  • It's intentional, so you won't have to move around constantly clicking around.

    You can disable it quite easily by switching

    look-controls="pointerLockEnabled: true"
    

    to

    look-controls="pointerLockEnabled: false"
    

    I see your version also has the pointerLockEnabled property.


    Nonetheless, i would recommend switching to the newest a-frame build + a-frame extras, since there was a ton of polishing and bug-fixes.


    Glitch with pointerLockEnabled: true
    Glitch with pointerLockEnabled: false
    source here.