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

Problem with collision when I put areaBind in ActionDown and Move #11

Open
brunogabriel opened this issue Jul 31, 2014 · 0 comments
Open

Comments

@brunogabriel
Copy link

Hello, I am trying to use box2d extension to detect collision in walls. For example, my player move through with drag on the screen and I need to put the rules:
setTouchAreaBindingOnActionDown Enabled(true);
setTouchAreaBindingOnActionMoveEnabled(true);
But, if I use this combinations (down and move), my player overlap the walls.

If I put only works allright, but I lose my player a lot in the screen.
I am using this idea to move my player:
if (pSceneTouchEvent.isActionMove()) {
final Body faceBody = (Body) getUserData();
faceBody.setTransform(
pSceneTouchEvent.getX()
/ PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT,
pSceneTouchEvent.getY()
/ PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT,
faceBody.getAngle());
return true;

            }

Thank you.

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