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