Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Shape2D¶
Inherits: Resource < RefCounted < Object
Inherited By: CapsuleShape2D, CircleShape2D, ConcavePolygonShape2D, ConvexPolygonShape2D, RectangleShape2D, SegmentShape2D, SeparationRayShape2D, WorldBoundaryShape2D
Abstract base class for 2D shapes used for physics collision.
Description¶
Abstract base class for all 2D shapes, intended for use in physics.
Performance: Primitive shapes, especially CircleShape2D, are fast to check collisions against. ConvexPolygonShape2D is slower, and ConcavePolygonShape2D is the slowest.
Tutorials¶
Properties¶
|
Methods¶
collide ( Transform2D local_xform, Shape2D with_shape, Transform2D shape_xform ) |
|
collide_and_get_contacts ( Transform2D local_xform, Shape2D with_shape, Transform2D shape_xform ) |
|
collide_with_motion ( Transform2D local_xform, Vector2 local_motion, Shape2D with_shape, Transform2D shape_xform, Vector2 shape_motion ) |
|
collide_with_motion_and_get_contacts ( Transform2D local_xform, Vector2 local_motion, Shape2D with_shape, Transform2D shape_xform, Vector2 shape_motion ) |
|
void |
|
get_rect ( ) const |