class_physicstestmotionparameters3d.rst 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the PhysicsTestMotionParameters3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PhysicsTestMotionParameters3D:
  6. PhysicsTestMotionParameters3D
  7. =============================
  8. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Parameters to be sent to a 3D body motion test.
  10. Description
  11. -----------
  12. This class contains parameters used in :ref:`PhysicsServer3D.body_test_motion<class_PhysicsServer3D_method_body_test_motion>`.
  13. Properties
  14. ----------
  15. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`collide_separation_ray<class_PhysicsTestMotionParameters3D_property_collide_separation_ray>` | ``false`` |
  17. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  18. | :ref:`Array<class_Array>` | :ref:`exclude_bodies<class_PhysicsTestMotionParameters3D_property_exclude_bodies>` | ``[]`` |
  19. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  20. | :ref:`Array<class_Array>` | :ref:`exclude_objects<class_PhysicsTestMotionParameters3D_property_exclude_objects>` | ``[]`` |
  21. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  22. | :ref:`Transform3D<class_Transform3D>` | :ref:`from<class_PhysicsTestMotionParameters3D_property_from>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
  23. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`margin<class_PhysicsTestMotionParameters3D_property_margin>` | ``0.001`` |
  25. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  26. | :ref:`int<class_int>` | :ref:`max_collisions<class_PhysicsTestMotionParameters3D_property_max_collisions>` | ``1`` |
  27. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  28. | :ref:`Vector3<class_Vector3>` | :ref:`motion<class_PhysicsTestMotionParameters3D_property_motion>` | ``Vector3(0, 0, 0)`` |
  29. +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+
  30. Property Descriptions
  31. ---------------------
  32. .. _class_PhysicsTestMotionParameters3D_property_collide_separation_ray:
  33. - :ref:`bool<class_bool>` **collide_separation_ray**
  34. +-----------+-------------------------------------------+
  35. | *Default* | ``false`` |
  36. +-----------+-------------------------------------------+
  37. | *Setter* | set_collide_separation_ray_enabled(value) |
  38. +-----------+-------------------------------------------+
  39. | *Getter* | is_collide_separation_ray_enabled() |
  40. +-----------+-------------------------------------------+
  41. 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.
  42. 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.
  43. ----
  44. .. _class_PhysicsTestMotionParameters3D_property_exclude_bodies:
  45. - :ref:`Array<class_Array>` **exclude_bodies**
  46. +-----------+---------------------------+
  47. | *Default* | ``[]`` |
  48. +-----------+---------------------------+
  49. | *Setter* | set_exclude_bodies(value) |
  50. +-----------+---------------------------+
  51. | *Getter* | get_exclude_bodies() |
  52. +-----------+---------------------------+
  53. Optional array of body :ref:`RID<class_RID>` to exclude from collision.
  54. ----
  55. .. _class_PhysicsTestMotionParameters3D_property_exclude_objects:
  56. - :ref:`Array<class_Array>` **exclude_objects**
  57. +-----------+----------------------------+
  58. | *Default* | ``[]`` |
  59. +-----------+----------------------------+
  60. | *Setter* | set_exclude_objects(value) |
  61. +-----------+----------------------------+
  62. | *Getter* | get_exclude_objects() |
  63. +-----------+----------------------------+
  64. Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`.
  65. ----
  66. .. _class_PhysicsTestMotionParameters3D_property_from:
  67. - :ref:`Transform3D<class_Transform3D>` **from**
  68. +-----------+-----------------------------------------------------+
  69. | *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
  70. +-----------+-----------------------------------------------------+
  71. | *Setter* | set_from(value) |
  72. +-----------+-----------------------------------------------------+
  73. | *Getter* | get_from() |
  74. +-----------+-----------------------------------------------------+
  75. 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.
  76. ----
  77. .. _class_PhysicsTestMotionParameters3D_property_margin:
  78. - :ref:`float<class_float>` **margin**
  79. +-----------+-------------------+
  80. | *Default* | ``0.001`` |
  81. +-----------+-------------------+
  82. | *Setter* | set_margin(value) |
  83. +-----------+-------------------+
  84. | *Getter* | get_margin() |
  85. +-----------+-------------------+
  86. Increases the size of the shapes involved in the collision detection.
  87. ----
  88. .. _class_PhysicsTestMotionParameters3D_property_max_collisions:
  89. - :ref:`int<class_int>` **max_collisions**
  90. +-----------+---------------------------+
  91. | *Default* | ``1`` |
  92. +-----------+---------------------------+
  93. | *Setter* | set_max_collisions(value) |
  94. +-----------+---------------------------+
  95. | *Getter* | get_max_collisions() |
  96. +-----------+---------------------------+
  97. Maximum number of returned collisions, between ``1`` and ``32``. Always returns the deepest detected collisions.
  98. ----
  99. .. _class_PhysicsTestMotionParameters3D_property_motion:
  100. - :ref:`Vector3<class_Vector3>` **motion**
  101. +-----------+----------------------+
  102. | *Default* | ``Vector3(0, 0, 0)`` |
  103. +-----------+----------------------+
  104. | *Setter* | set_motion(value) |
  105. +-----------+----------------------+
  106. | *Getter* | get_motion() |
  107. +-----------+----------------------+
  108. Motion vector to define the length and direction of the motion to test.
  109. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  110. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  111. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  112. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  113. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  114. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`