class_physicstestmotionresult3d.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicsTestMotionResult3D.xml.
  6. .. _class_PhysicsTestMotionResult3D:
  7. PhysicsTestMotionResult3D
  8. =========================
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion<class_PhysicsServer3D_method_body_test_motion>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Describes the motion and collision result from :ref:`PhysicsServer3D.body_test_motion<class_PhysicsServer3D_method_body_test_motion>`.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Object<class_Object>` | :ref:`get_collider<class_PhysicsTestMotionResult3D_method_get_collider>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  22. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`get_collider_id<class_PhysicsTestMotionResult3D_method_get_collider_id>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  24. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_PhysicsTestMotionResult3D_method_get_collider_rid>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  26. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_collider_shape<class_PhysicsTestMotionResult3D_method_get_collider_shape>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  28. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Vector3<class_Vector3>` | :ref:`get_collider_velocity<class_PhysicsTestMotionResult3D_method_get_collider_velocity>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  30. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`int<class_int>` | :ref:`get_collision_count<class_PhysicsTestMotionResult3D_method_get_collision_count>`\ (\ ) |const| |
  32. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`float<class_float>` | :ref:`get_collision_depth<class_PhysicsTestMotionResult3D_method_get_collision_depth>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  34. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`int<class_int>` | :ref:`get_collision_local_shape<class_PhysicsTestMotionResult3D_method_get_collision_local_shape>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  36. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_PhysicsTestMotionResult3D_method_get_collision_normal>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  38. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_PhysicsTestMotionResult3D_method_get_collision_point>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| |
  40. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`float<class_float>` | :ref:`get_collision_safe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction>`\ (\ ) |const| |
  42. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`float<class_float>` | :ref:`get_collision_unsafe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction>`\ (\ ) |const| |
  44. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`Vector3<class_Vector3>` | :ref:`get_remainder<class_PhysicsTestMotionResult3D_method_get_remainder>`\ (\ ) |const| |
  46. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`Vector3<class_Vector3>` | :ref:`get_travel<class_PhysicsTestMotionResult3D_method_get_travel>`\ (\ ) |const| |
  48. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Method Descriptions
  53. -------------------
  54. .. _class_PhysicsTestMotionResult3D_method_get_collider:
  55. .. rst-class:: classref-method
  56. :ref:`Object<class_Object>` **get_collider**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider>`
  57. Returns the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default), if a collision occurred.
  58. .. rst-class:: classref-item-separator
  59. ----
  60. .. _class_PhysicsTestMotionResult3D_method_get_collider_id:
  61. .. rst-class:: classref-method
  62. :ref:`int<class_int>` **get_collider_id**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_id>`
  63. Returns the unique instance ID of the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default), if a collision occurred. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_PhysicsTestMotionResult3D_method_get_collider_rid:
  67. .. rst-class:: classref-method
  68. :ref:`RID<class_RID>` **get_collider_rid**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_rid>`
  69. Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` given a collision index (the deepest collision by default), if a collision occurred.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_PhysicsTestMotionResult3D_method_get_collider_shape:
  73. .. rst-class:: classref-method
  74. :ref:`int<class_int>` **get_collider_shape**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_shape>`
  75. Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See :ref:`CollisionObject3D<class_CollisionObject3D>`.
  76. .. rst-class:: classref-item-separator
  77. ----
  78. .. _class_PhysicsTestMotionResult3D_method_get_collider_velocity:
  79. .. rst-class:: classref-method
  80. :ref:`Vector3<class_Vector3>` **get_collider_velocity**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_velocity>`
  81. Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_PhysicsTestMotionResult3D_method_get_collision_count:
  85. .. rst-class:: classref-method
  86. :ref:`int<class_int>` **get_collision_count**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_count>`
  87. Returns the number of detected collisions.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_PhysicsTestMotionResult3D_method_get_collision_depth:
  91. .. rst-class:: classref-method
  92. :ref:`float<class_float>` **get_collision_depth**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_depth>`
  93. Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_PhysicsTestMotionResult3D_method_get_collision_local_shape:
  97. .. rst-class:: classref-method
  98. :ref:`int<class_int>` **get_collision_local_shape**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_local_shape>`
  99. Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_PhysicsTestMotionResult3D_method_get_collision_normal:
  103. .. rst-class:: classref-method
  104. :ref:`Vector3<class_Vector3>` **get_collision_normal**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_normal>`
  105. 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.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_PhysicsTestMotionResult3D_method_get_collision_point:
  109. .. rst-class:: classref-method
  110. :ref:`Vector3<class_Vector3>` **get_collision_point**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_point>`
  111. Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction:
  115. .. rst-class:: classref-method
  116. :ref:`float<class_float>` **get_collision_safe_fraction**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction>`
  117. Returns the maximum fraction of the motion that can occur without a collision, between ``0`` and ``1``.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction:
  121. .. rst-class:: classref-method
  122. :ref:`float<class_float>` **get_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction>`
  123. Returns the minimum fraction of the motion needed to collide, if a collision occurred, between ``0`` and ``1``.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_PhysicsTestMotionResult3D_method_get_remainder:
  127. .. rst-class:: classref-method
  128. :ref:`Vector3<class_Vector3>` **get_remainder**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_remainder>`
  129. Returns the moving object's remaining movement vector.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_PhysicsTestMotionResult3D_method_get_travel:
  133. .. rst-class:: classref-method
  134. :ref:`Vector3<class_Vector3>` **get_travel**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_travel>`
  135. Returns the moving object's travel before collision.
  136. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  137. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  138. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  139. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  140. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  141. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  142. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  143. .. |void| replace:: :abbr:`void (No return value.)`