Skip to content

WASD Controls: right-click or opening popover while moving causes camera/user to wander off #4766

@djoksimo

Description

@djoksimo

Description:

  • A-Frame Version: 1.1.0 + previous 1.x.x versions
  • Platform / Device: Tested on Chrome/Safari/Firefox – Macbook
  • Reproducible Code Snippet or URL: basic aframe sandbox: https://ionized-sun-pasta.glitch.me

Steps to reproduce:

  1. enable wasd-controls
  2. hold any of the arrow-keys
  3. right-click while pressing an arrow-key
  4. camera/user continues to wander off and continue moving

I'm able to stop the wandering by repeatedly press random arrow keys to pause movement and resume expected behaviour.

Similar behaviour occurs with absolutely positioned overlays or popovers are opened (while the user is holding down an arrow/wasd key)

Potential fix:

omit right-click event from being captured (I don't know if this will work)

or

add event listener for right-click, and call in event handler for this event.

this.pause()

onBlur: function () {


I couldn't find a reported opened/closed issue for this bug, so apologies if this is a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions