Skip to content

mouse joint problem on mobile devices #15

Open
@codinglava

Description

If we use box2d on a mobile device:

  1. mouse_down may occur with no mouse_move before it
  2. if we use mouse joint then for some reason "createDragJoint" is always called before a mouse_down in Input class
  3. so then Input.mousePos contains invalid coord when createDragJoint called

Calling Input.initialize before World.create won't help.

Workaround is to listen for Input's mouse_down in capture phase
(Input.as, line 49:
s.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown, true, 0, true);
)

Not sure if this a good way to fix it..

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions