Physics.P2.Body#collideWorldBounds

collideWorldBounds : boolean

A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World.
Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials.
Also note that when you set this it will only effect Body shapes that already exist. If you then add further shapes to your Body
after setting this it will not proactively set them to collide with the bounds. Should the Body collide with the World bounds?

Source code: physics/p2/Body.js (Line 1949)
doc_phaser
2017-02-14 11:01:56
Comments
Leave a Comment

Please login to continue.