
Collision shape base class.
Kind: global class
Create the collision shape.
StringGet the collision shape’s unique identifier.
Kind: instance property of CollisionShape
Returns: String - Shape’s unique identifier
Get collision flags (matched against collision mask when checking collision).
Kind: instance property of CollisionShape
Set collision flags (matched against collision mask when checking collision).
Kind: instance property of CollisionShape
Set the debug color to use to draw this shape.
Kind: instance method of CollisionShape
| Param | Type | Description |
|---|---|---|
| color | Color |
Color to set or null to use default. |
Debug draw this shape.
Kind: instance method of CollisionShape
| Param | Type | Description |
|---|---|---|
| opacity | Number |
Shape opacity factor. |
| shapesBatch | ShapesBatch |
Optional shapes batch to use to debug draw the shape. By default will use the collision world. |
Vector2Get shape center position.
Kind: instance method of CollisionShape
Returns: Vector2 - Center position.
Remove self from parent world object.
Kind: instance method of CollisionShape