2

I would like to get the relative mouseX and mouseY position for some dynamic gravity positioning.

I have noticed that events can only be applied to nodes.

    this.scene.addUIEvent('click');
    console.log('scene', this.scene);
    this.scene.addComponent({
      onReceive: function(e, payload) {
        console.log(e, payload)
        if (e == "mousemove") {
          var pos = payload.node.getPosition()
          anchor.x = pos[0];
          anchor.y = pos[1];
        }

      }
    });

Is it possible to get the mouse position in Famous coordinates system? Without it being over a node?

Drew Gaynor
  • 8,292
  • 5
  • 40
  • 53
MichaelBell
  • 890
  • 1
  • 10
  • 24

0 Answers0