PhysicsCollideShapeResult3D
Inherits: RefCounted < Object
Description
Section titled “Description”Stores the collision points of a shape collision query.
This class contains the contact points computed by PhysicsDirectSpaceState3D.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
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| int | max_collisions |
32 |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| int | get_collision_count() const |
| Vector3 | get_point_on_colliding_shape(collision_index: int) const |
| Vector3 | get_point_on_queried_shape(collision_index: int) const |
Property descriptions
Section titled “Property descriptions”max_collisions
int max_collisions = 32
The maximum number of collisions this object can store.
Method descriptions
Section titled “Method descriptions”get_collision_count
int get_collision_count() const
Returns the number of point pairs detected by the query.
get_point_on_colliding_shape
Vector3 get_point_on_colliding_shape(collision_index: int) const
Returns the collision point on the colliding shape for the collision at the given index.
get_point_on_queried_shape
Vector3 get_point_on_queried_shape(collision_index: int) const
Returns the collision point on the query shape for the collision at the given index.
