Scans the current body to determine if a part of it was clicked on.
If a part is found the body is set as the constraint.bodyB
property,
as well as the body
property of this class. The part is also set.
name | type | description |
---|---|---|
body | MatterJS.BodyType |
The Matter Body to check. |
position | Phaser.Math.Vector2 |
A translated hit test position. |
true
if a part of the body was hit, otherwise false
.