class_physicstestmotionresult3d.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. Result from a 3D body motion test.
  11. Description
  12. -----------
  13. This class contains the motion and collision result from :ref:`PhysicsServer3D.body_test_motion<class_PhysicsServer3D_method_body_test_motion>`.
  14. Methods
  15. -------
  16. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Object<class_Object>` | :ref:`get_collider<class_PhysicsTestMotionResult3D_method_get_collider>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  18. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_collider_id<class_PhysicsTestMotionResult3D_method_get_collider_id>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  20. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_PhysicsTestMotionResult3D_method_get_collider_rid>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  22. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`get_collider_shape<class_PhysicsTestMotionResult3D_method_get_collider_shape>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  24. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Vector3<class_Vector3>` | :ref:`get_collider_velocity<class_PhysicsTestMotionResult3D_method_get_collider_velocity>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  26. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_collision_count<class_PhysicsTestMotionResult3D_method_get_collision_count>` **(** **)** |const| |
  28. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`float<class_float>` | :ref:`get_collision_depth<class_PhysicsTestMotionResult3D_method_get_collision_depth>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  30. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`int<class_int>` | :ref:`get_collision_local_shape<class_PhysicsTestMotionResult3D_method_get_collision_local_shape>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  32. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_PhysicsTestMotionResult3D_method_get_collision_normal>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  34. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_PhysicsTestMotionResult3D_method_get_collision_point>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| |
  36. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`float<class_float>` | :ref:`get_collision_safe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction>` **(** **)** |const| |
  38. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`float<class_float>` | :ref:`get_collision_unsafe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction>` **(** **)** |const| |
  40. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Vector3<class_Vector3>` | :ref:`get_remainder<class_PhysicsTestMotionResult3D_method_get_remainder>` **(** **)** |const| |
  42. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Vector3<class_Vector3>` | :ref:`get_travel<class_PhysicsTestMotionResult3D_method_get_travel>` **(** **)** |const| |
  44. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. Method Descriptions
  46. -------------------
  47. .. _class_PhysicsTestMotionResult3D_method_get_collider:
  48. - :ref:`Object<class_Object>` **get_collider** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  49. Returns the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default), if a collision occurred.
  50. ----
  51. .. _class_PhysicsTestMotionResult3D_method_get_collider_id:
  52. - :ref:`int<class_int>` **get_collider_id** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  53. 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>`.
  54. ----
  55. .. _class_PhysicsTestMotionResult3D_method_get_collider_rid:
  56. - :ref:`RID<class_RID>` **get_collider_rid** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  57. 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.
  58. ----
  59. .. _class_PhysicsTestMotionResult3D_method_get_collider_shape:
  60. - :ref:`int<class_int>` **get_collider_shape** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  61. 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>`.
  62. ----
  63. .. _class_PhysicsTestMotionResult3D_method_get_collider_velocity:
  64. - :ref:`Vector3<class_Vector3>` **get_collider_velocity** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  65. Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred.
  66. ----
  67. .. _class_PhysicsTestMotionResult3D_method_get_collision_count:
  68. - :ref:`int<class_int>` **get_collision_count** **(** **)** |const|
  69. Returns the number of detected collisions.
  70. ----
  71. .. _class_PhysicsTestMotionResult3D_method_get_collision_depth:
  72. - :ref:`float<class_float>` **get_collision_depth** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  73. Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred.
  74. ----
  75. .. _class_PhysicsTestMotionResult3D_method_get_collision_local_shape:
  76. - :ref:`int<class_int>` **get_collision_local_shape** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  77. Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred.
  78. ----
  79. .. _class_PhysicsTestMotionResult3D_method_get_collision_normal:
  80. - :ref:`Vector3<class_Vector3>` **get_collision_normal** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  81. 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.
  82. ----
  83. .. _class_PhysicsTestMotionResult3D_method_get_collision_point:
  84. - :ref:`Vector3<class_Vector3>` **get_collision_point** **(** :ref:`int<class_int>` collision_index=0 **)** |const|
  85. Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred.
  86. ----
  87. .. _class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction:
  88. - :ref:`float<class_float>` **get_collision_safe_fraction** **(** **)** |const|
  89. Returns the maximum fraction of the motion that can occur without a collision, between ``0`` and ``1``.
  90. ----
  91. .. _class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction:
  92. - :ref:`float<class_float>` **get_collision_unsafe_fraction** **(** **)** |const|
  93. Returns the minimum fraction of the motion needed to collide, if a collision occurred, between ``0`` and ``1``.
  94. ----
  95. .. _class_PhysicsTestMotionResult3D_method_get_remainder:
  96. - :ref:`Vector3<class_Vector3>` **get_remainder** **(** **)** |const|
  97. Returns the moving object's remaining movement vector.
  98. ----
  99. .. _class_PhysicsTestMotionResult3D_method_get_travel:
  100. - :ref:`Vector3<class_Vector3>` **get_travel** **(** **)** |const|
  101. Returns the moving object's travel before collision.
  102. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  103. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  104. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  105. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  106. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  107. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`