| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="PhysicsTestMotionResult3D" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Describes the motion and collision result from [method PhysicsServer3D.body_test_motion]. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Describes the motion and collision result from [method PhysicsServer3D.body_test_motion]. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="get_collider" qualifiers="const"> |
| 13 | <return type="Object" /> |
| 14 | <param index="0" name="collision_index" type="int" default="0" /> |
| 15 | <description> |
| 16 | Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. |
| 17 | </description> |
| 18 | </method> |
| 19 | <method name="get_collider_id" qualifiers="const"> |
| 20 | <return type="int" /> |
| 21 | <param index="0" name="collision_index" type="int" default="0" /> |
| 22 | <description> |
| 23 | Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id]. |
| 24 | </description> |
| 25 | </method> |
| 26 | <method name="get_collider_rid" qualifiers="const"> |
| 27 | <return type="RID" /> |
| 28 | <param index="0" name="collision_index" type="int" default="0" /> |
| 29 | <description> |
| 30 | Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred. |
| 31 | </description> |
| 32 | </method> |
| 33 | <method name="get_collider_shape" qualifiers="const"> |
| 34 | <return type="int" /> |
| 35 | <param index="0" name="collision_index" type="int" default="0" /> |
| 36 | <description> |
| 37 | Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D]. |
| 38 | </description> |
| 39 | </method> |
| 40 | <method name="get_collider_velocity" qualifiers="const"> |
| 41 | <return type="Vector3" /> |
| 42 | <param index="0" name="collision_index" type="int" default="0" /> |
| 43 | <description> |
| 44 | Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred. |
| 45 | </description> |
| 46 | </method> |
| 47 | <method name="get_collision_count" qualifiers="const"> |
| 48 | <return type="int" /> |
| 49 | <description> |
| 50 | Returns the number of detected collisions. |
| 51 | </description> |
| 52 | </method> |
| 53 | <method name="get_collision_depth" qualifiers="const"> |
| 54 | <return type="float" /> |
| 55 | <param index="0" name="collision_index" type="int" default="0" /> |
| 56 | <description> |
| 57 | Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred. |
| 58 | </description> |
| 59 | </method> |
| 60 | <method name="get_collision_local_shape" qualifiers="const"> |
| 61 | <return type="int" /> |
| 62 | <param index="0" name="collision_index" type="int" default="0" /> |
| 63 | <description> |
| 64 | Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred. |
| 65 | </description> |
| 66 | </method> |
| 67 | <method name="get_collision_normal" qualifiers="const"> |
| 68 | <return type="Vector3" /> |
| 69 | <param index="0" name="collision_index" type="int" default="0" /> |
| 70 | <description> |
| 71 | Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred. |
| 72 | </description> |
| 73 | </method> |
| 74 | <method name="get_collision_point" qualifiers="const"> |
| 75 | <return type="Vector3" /> |
| 76 | <param index="0" name="collision_index" type="int" default="0" /> |
| 77 | <description> |
| 78 | Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred. |
| 79 | </description> |
| 80 | </method> |
| 81 | <method name="get_collision_safe_fraction" qualifiers="const"> |
| 82 | <return type="float" /> |
| 83 | <description> |
| 84 | Returns the maximum fraction of the motion that can occur without a collision, between [code]0[/code] and [code]1[/code]. |
| 85 | </description> |
| 86 | </method> |
| 87 | <method name="get_collision_unsafe_fraction" qualifiers="const"> |
| 88 | <return type="float" /> |
| 89 | <description> |
| 90 | Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code]. |
| 91 | </description> |
| 92 | </method> |
| 93 | <method name="get_remainder" qualifiers="const"> |
| 94 | <return type="Vector3" /> |
| 95 | <description> |
| 96 | Returns the moving object's remaining movement vector. |
| 97 | </description> |
| 98 | </method> |
| 99 | <method name="get_travel" qualifiers="const"> |
| 100 | <return type="Vector3" /> |
| 101 | <description> |
| 102 | Returns the moving object's travel before collision. |
| 103 | </description> |
| 104 | </method> |
| 105 | </methods> |
| 106 | </class> |