Struct Shape2D
Base class for all 2D shapes.
struct Shape2D
;
All 2D shape types inherit from this.
Properties
| Name | Type | Description |
|---|---|---|
customSolverBias[get, set]
|
double | The shape's custom solver bias. |
Methods
| Name | Description |
|---|---|
collide
|
Returns true if this shape is colliding with another.
This method needs the transformation matrix for this shape (local_xform), the shape to check collisions with (with_shape), and the transformation matrix of that shape (shape_xform).
|
collideAndGetContacts
|
Returns a list of the points where this shape touches another. If there are no collisions the list is empty.
This method needs the transformation matrix for this shape (local_xform), the shape to check collisions with (with_shape), and the transformation matrix of that shape (shape_xform).
|
collideWithMotion
|
Returns whether this shape would collide with another, if a given movement was applied.
This method needs the transformation matrix for this shape (local_xform), the movement to test on this shape (local_motion), the shape to check collisions with (with_shape), the transformation matrix of that shape (shape_xform), and the movement to test onto the other object (shape_motion).
|
collideWithMotionAndGetContacts
|
Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty.
This method needs the transformation matrix for this shape (local_xform), the movement to test on this shape (local_motion), the shape to check collisions with (with_shape), the transformation matrix of that shape (shape_xform), and the movement to test onto the other object (shape_motion).
|
getCustomSolverBias
|
|
setCustomSolverBias
|