class_physicstestmotionparameters3d.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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/PhysicsTestMotionParameters3D.xml.
  6. .. _class_PhysicsTestMotionParameters3D:
  7. PhysicsTestMotionParameters3D
  8. =============================
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Parameters to be sent to a 3D body motion test.
  11. Description
  12. -----------
  13. This class contains parameters used in :ref:`PhysicsServer3D.body_test_motion<class_PhysicsServer3D_method_body_test_motion>`.
  14. Properties
  15. ----------
  16. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`collide_separation_ray<class_PhysicsTestMotionParameters3D_property_collide_separation_ray>` | ``false`` |
  18. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  19. | :ref:`Array<class_Array>` | :ref:`exclude_bodies<class_PhysicsTestMotionParameters3D_property_exclude_bodies>` | ``[]`` |
  20. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  21. | :ref:`Array<class_Array>` | :ref:`exclude_objects<class_PhysicsTestMotionParameters3D_property_exclude_objects>` | ``[]`` |
  22. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  23. | :ref:`Transform3D<class_Transform3D>` | :ref:`from<class_PhysicsTestMotionParameters3D_property_from>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
  24. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`margin<class_PhysicsTestMotionParameters3D_property_margin>` | ``0.001`` |
  26. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`max_collisions<class_PhysicsTestMotionParameters3D_property_max_collisions>` | ``1`` |
  28. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  29. | :ref:`Vector3<class_Vector3>` | :ref:`motion<class_PhysicsTestMotionParameters3D_property_motion>` | ``Vector3(0, 0, 0)`` |
  30. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`recovery_as_collision<class_PhysicsTestMotionParameters3D_property_recovery_as_collision>` | ``false`` |
  32. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  33. Property Descriptions
  34. ---------------------
  35. .. _class_PhysicsTestMotionParameters3D_property_collide_separation_ray:
  36. - :ref:`bool<class_bool>` **collide_separation_ray**
  37. +-----------+-------------------------------------------+
  38. | *Default* | ``false`` |
  39. +-----------+-------------------------------------------+
  40. | *Setter* | set_collide_separation_ray_enabled(value) |
  41. +-----------+-------------------------------------------+
  42. | *Getter* | is_collide_separation_ray_enabled() |
  43. +-----------+-------------------------------------------+
  44. If set to ``true``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY<class_PhysicsServer3D_constant_SHAPE_SEPARATION_RAY>` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.
  45. If set to ``false``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY<class_PhysicsServer3D_constant_SHAPE_SEPARATION_RAY>` are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
  46. ----
  47. .. _class_PhysicsTestMotionParameters3D_property_exclude_bodies:
  48. - :ref:`Array<class_Array>` **exclude_bodies**
  49. +-----------+---------------------------+
  50. | *Default* | ``[]`` |
  51. +-----------+---------------------------+
  52. | *Setter* | set_exclude_bodies(value) |
  53. +-----------+---------------------------+
  54. | *Getter* | get_exclude_bodies() |
  55. +-----------+---------------------------+
  56. Optional array of body :ref:`RID<class_RID>` to exclude from collision.
  57. ----
  58. .. _class_PhysicsTestMotionParameters3D_property_exclude_objects:
  59. - :ref:`Array<class_Array>` **exclude_objects**
  60. +-----------+----------------------------+
  61. | *Default* | ``[]`` |
  62. +-----------+----------------------------+
  63. | *Setter* | set_exclude_objects(value) |
  64. +-----------+----------------------------+
  65. | *Getter* | get_exclude_objects() |
  66. +-----------+----------------------------+
  67. Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`.
  68. ----
  69. .. _class_PhysicsTestMotionParameters3D_property_from:
  70. - :ref:`Transform3D<class_Transform3D>` **from**
  71. +-----------+-----------------------------------------------------+
  72. | *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
  73. +-----------+-----------------------------------------------------+
  74. | *Setter* | set_from(value) |
  75. +-----------+-----------------------------------------------------+
  76. | *Getter* | get_from() |
  77. +-----------+-----------------------------------------------------+
  78. Transform in global space where the motion should start. Usually set to :ref:`Node3D.global_transform<class_Node3D_property_global_transform>` for the current body's transform.
  79. ----
  80. .. _class_PhysicsTestMotionParameters3D_property_margin:
  81. - :ref:`float<class_float>` **margin**
  82. +-----------+-------------------+
  83. | *Default* | ``0.001`` |
  84. +-----------+-------------------+
  85. | *Setter* | set_margin(value) |
  86. +-----------+-------------------+
  87. | *Getter* | get_margin() |
  88. +-----------+-------------------+
  89. Increases the size of the shapes involved in the collision detection.
  90. ----
  91. .. _class_PhysicsTestMotionParameters3D_property_max_collisions:
  92. - :ref:`int<class_int>` **max_collisions**
  93. +-----------+---------------------------+
  94. | *Default* | ``1`` |
  95. +-----------+---------------------------+
  96. | *Setter* | set_max_collisions(value) |
  97. +-----------+---------------------------+
  98. | *Getter* | get_max_collisions() |
  99. +-----------+---------------------------+
  100. Maximum number of returned collisions, between ``1`` and ``32``. Always returns the deepest detected collisions.
  101. ----
  102. .. _class_PhysicsTestMotionParameters3D_property_motion:
  103. - :ref:`Vector3<class_Vector3>` **motion**
  104. +-----------+----------------------+
  105. | *Default* | ``Vector3(0, 0, 0)`` |
  106. +-----------+----------------------+
  107. | *Setter* | set_motion(value) |
  108. +-----------+----------------------+
  109. | *Getter* | get_motion() |
  110. +-----------+----------------------+
  111. Motion vector to define the length and direction of the motion to test.
  112. ----
  113. .. _class_PhysicsTestMotionParameters3D_property_recovery_as_collision:
  114. - :ref:`bool<class_bool>` **recovery_as_collision**
  115. +-----------+------------------------------------------+
  116. | *Default* | ``false`` |
  117. +-----------+------------------------------------------+
  118. | *Setter* | set_recovery_as_collision_enabled(value) |
  119. +-----------+------------------------------------------+
  120. | *Getter* | is_recovery_as_collision_enabled() |
  121. +-----------+------------------------------------------+
  122. If set to ``true``, any depenetration from the recovery phase is reported as a collision; this is used e.g. by :ref:`CharacterBody3D.move_and_slide<class_CharacterBody3D_method_move_and_slide>` for improving floor detection when floor snapping is disabled.
  123. If set to ``false``, only collisions resulting from the motion are detected; this is used e.g. by :ref:`PhysicsBody3D.move_and_collide<class_PhysicsBody3D_method_move_and_collide>`.
  124. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  125. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  126. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  127. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  128. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  129. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`