-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels