Skip to content

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

@brunogabriel

Description

@brunogabriel

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

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