You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: