Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse joint problem on mobile devices #15

Open
codinglava opened this issue Aug 20, 2012 · 0 comments
Open

mouse joint problem on mobile devices #15

codinglava opened this issue Aug 20, 2012 · 0 comments

Comments

@codinglava
Copy link

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant