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...
PhysicsIntersectShapeResult2D
Inherits: RefCounted < Object
Stores the results of a shape intersection query.
Description
This class contains the intersection information produced by PhysicsDirectSpaceState2D.intersect_shape_into().
It can store multiple intersections, up to a user-defined maximum.
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_collider(intersection_index: int) const |
|
get_collider_id(intersection_index: int) const |
|
get_collider_rid(intersection_index: int) const |
|
get_collider_shape(intersection_index: int) const |
|
get_intersection_count() const |
Property Descriptions
The maximum number of intersections this result object can store.
Method Descriptions
Object get_collider(intersection_index: int) const 🔗
The colliding object.
int get_collider_id(intersection_index: int) const 🔗
The colliding object's ID.
RID get_collider_rid(intersection_index: int) const 🔗
The intersecting object's RID.
int get_collider_shape(intersection_index: int) const 🔗
The shape index of the colliding shape.
int get_intersection_count() const 🔗
Returns the number of shapes that intersect with the query shape.