setCircle(radius, offsetX, offsetY, rotation)
Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body.
If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
radius | number | The radius of this circle (in pixels) | ||
offsetX | number | <optional> | 0 | Local horizontal offset of the shape relative to the body center of mass. |
offsetY | number | <optional> | 0 | Local vertical offset of the shape relative to the body center of mass. |
rotation | number | <optional> | 0 | Local rotation of the shape relative to the body center of mass, specified in radians. |
- Source code: physics/p2/Body.js (Line 1210)
Please login to continue.