Skip to content
0.2.0-dev Download ZIP
40 lines ·1.7 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="PhysicsCollideShapeResult2D" inherits="RefCounted" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Stores the collision points of a shape collision query.
5 </brief_description>
6 <description>
7 This class contains the contact points computed by [method PhysicsDirectSpaceState2D.collide_shape_into].
8 Each collision is represented as a pair of points: one on the query shape and one on the colliding shape.
9 [b]Note:[/b] For optimal performance results, it is recommended to create this object in advance, store it, and reuse it for every subsequent query.
10 </description>
11 <tutorials>
12 </tutorials>
13 <methods>
14 <method name="get_collision_count" qualifiers="const">
15 <return type="int" />
16 <description>
17 Returns the number of point pairs detected by the query.
18 </description>
19 </method>
20 <method name="get_point_on_colliding_shape" qualifiers="const">
21 <return type="Vector2" />
22 <param index="0" name="collision_index" type="int" />
23 <description>
24 Returns the collision point on the colliding shape for the collision at the given index.
25 </description>
26 </method>
27 <method name="get_point_on_queried_shape" qualifiers="const">
28 <return type="Vector2" />
29 <param index="0" name="collision_index" type="int" />
30 <description>
31 Returns the collision point on the query shape for the collision at the given index.
32 </description>
33 </method>
34 </methods>
35 <members>
36 <member name="max_collisions" type="int" setter="set_max_collisions" getter="get_max_collisions" default="32">
37 The maximum number of collisions this object can store.
38 </member>
39 </members>
40</class>