Debian Codegraph @

doc/classes/KinematicCollision3D.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="KinematicCollision3D" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Holds collision data from the movement of a [PhysicsBody3D].
5 </brief_description>
6 <description>
7 Holds collision data from the movement of a [PhysicsBody3D], usually from [method PhysicsBody3D.move_and_collide]. When a [PhysicsBody3D] is moved, it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision3D] object is returned.
8 The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision.
9 </description>
10 <tutorials>
11 </tutorials>
12 <methods>
13 <method name="get_angle" qualifiers="const">
14 <return type="float" />
15 <param index="0" name="collision_index" type="int" default="0" />
16 <param index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
17 <description>
18 Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive.
19 </description>
20 </method>
21 <method name="get_collider" qualifiers="const">
22 <return type="Object" />
23 <param index="0" name="collision_index" type="int" default="0" />
24 <description>
25 Returns the colliding body's attached [Object] given a collision index (the deepest collision by default).
26 </description>
27 </method>
28 <method name="get_collider_id" qualifiers="const">
29 <return type="int" />
30 <param index="0" name="collision_index" type="int" default="0" />
31 <description>
32 Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default). See [method Object.get_instance_id].
33 </description>
34 </method>
35 <method name="get_collider_rid" qualifiers="const">
36 <return type="RID" />
37 <param index="0" name="collision_index" type="int" default="0" />
38 <description>
39 Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default).
40 </description>
41 </method>
42 <method name="get_collider_shape" qualifiers="const">
43 <return type="Object" />
44 <param index="0" name="collision_index" type="int" default="0" />
45 <description>
46 Returns the colliding body's shape given a collision index (the deepest collision by default).
47 </description>
48 </method>
49 <method name="get_collider_shape_index" qualifiers="const">
50 <return type="int" />
51 <param index="0" name="collision_index" type="int" default="0" />
52 <description>
53 Returns the colliding body's shape index given a collision index (the deepest collision by default). See [CollisionObject3D].
54 </description>
55 </method>
56 <method name="get_collider_velocity" qualifiers="const">
57 <return type="Vector3" />
58 <param index="0" name="collision_index" type="int" default="0" />
59 <description>
60 Returns the colliding body's velocity given a collision index (the deepest collision by default).
61 </description>
62 </method>
63 <method name="get_collision_count" qualifiers="const">
64 <return type="int" />
65 <description>
66 Returns the number of detected collisions.
67 </description>
68 </method>
69 <method name="get_depth" qualifiers="const">
70 <return type="float" />
71 <description>
72 Returns the colliding body's length of overlap along the collision normal.
73 </description>
74 </method>
75 <method name="get_local_shape" qualifiers="const">
76 <return type="Object" />
77 <param index="0" name="collision_index" type="int" default="0" />
78 <description>
79 Returns the moving object's colliding shape given a collision index (the deepest collision by default).
80 </description>
81 </method>
82 <method name="get_normal" qualifiers="const">
83 <return type="Vector3" />
84 <param index="0" name="collision_index" type="int" default="0" />
85 <description>
86 Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default).
87 </description>
88 </method>
89 <method name="get_position" qualifiers="const">
90 <return type="Vector3" />
91 <param index="0" name="collision_index" type="int" default="0" />
92 <description>
93 Returns the point of collision in global coordinates given a collision index (the deepest collision by default).
94 </description>
95 </method>
96 <method name="get_remainder" qualifiers="const">
97 <return type="Vector3" />
98 <description>
99 Returns the moving object's remaining movement vector.
100 </description>
101 </method>
102 <method name="get_travel" qualifiers="const">
103 <return type="Vector3" />
104 <description>
105 Returns the moving object's travel before collision.
106 </description>
107 </method>
108 </methods>
109 </class>