Skip to content

enableDrag doesn't take anchor into account #1593

@unindented

Description

@unindented

If I have the following:

paddle.anchor.setTo(0.5);

paddle.inputEnabled = true;
paddle.input.setDragLock(false, true);
paddle.input.enableDrag(false, false, false, false, this.game.world.bounds);

I can only drag my paddles so far down:

screen shot 2015-02-01 at 19 09 52

The opposite happens when I drag up: the paddles are able to move beyond the world boundaries by half their height.

If I comment out paddle.anchor.setTo(0.5) then everything works as expected.

Is this a bug in enableDrag, or am I supposed to deal with it in my code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions