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

body.checkCollision.none, body.checkCollision.any do not prevent collisions #2661

Closed
samme opened this issue Jul 23, 2016 · 4 comments
Closed

Comments

@samme
Copy link
Contributor

samme commented Jul 23, 2016

http://phaser.io/sandbox/CDdkxjgV

Set the checkCollision properties to control which directions collision is processed for this Body. …

checkCollision includes any and none, but setting any = false or none = true doesn't prevent collisions.

This issue is about

  • A bug in the API (or)
  • An error in the documentation
@photonstorm
Copy link
Collaborator

To be honest I can't think of a reason why checkCollision.none is even in there. I'm thinking it may be a copy-paste left over from the Body.touching object. If you want to disable collision on a Body you should use Body.enable = false. I'm going to remove it, thanks for spotting it.

photonstorm added a commit that referenced this issue Jul 23, 2016
…ysics.Body class. It was never used internally, so lead to confusion about its use. To disable a body, use `body.enable = false` (thanks @samme #2661)
@photonstorm
Copy link
Collaborator

Thanks for submitting this issue. We have fixed this, and the fix has been pushed to the dev branch.

@photonstorm
Copy link
Collaborator

Actually I'm changing my mind :) I can think of reasons while you'd want a Body updating but not checking for collision.

@photonstorm photonstorm reopened this Jul 23, 2016
photonstorm added a commit that referenced this issue Jul 23, 2016
…s available, but never used internally. It is now used and checked by the `separate` method. By setting `checkCollision.none = true` you can disable all collision and overlap checks on a Body, but still retain its motion updates (thanks @samme #2661)
@photonstorm
Copy link
Collaborator

There - much better. You can now set it, and it'll be checked inside of separate and skip the check if either of them has it set to true.

photonstorm added a commit that referenced this issue Jul 23, 2016
… of #2661, but is now properly respected thanks to that change (thanks @samme #2662)
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

2 participants