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...
PhysicsCollideShapeResult2D
Inherits: RefCounted < Object
Stores the collision points of a shape collision query.
Description
This class contains the contact points computed by PhysicsDirectSpaceState2D.collide_shape_into().
Each collision is represented as a pair of points: one on the query shape and one on the colliding shape.
Note: For optimal performance results, it is recommended to create this object in advance, store it, and reuse it for every subsequent query.
Properties
|
Methods
get_collision_count() const |
|
get_point_on_colliding_shape(collision_index: int) const |
|
get_point_on_queried_shape(collision_index: int) const |
Property Descriptions
The maximum number of collisions this object can store.
Method Descriptions
int get_collision_count() const 🔗
Returns the number of point pairs detected by the query.
Vector2 get_point_on_colliding_shape(collision_index: int) const 🔗
Returns the collision point on the colliding shape for the collision at the given index.
Vector2 get_point_on_queried_shape(collision_index: int) const 🔗
Returns the collision point on the query shape for the collision at the given index.