class_clippedcamera.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ClippedCamera.xml.
  6. .. _class_ClippedCamera:
  7. ClippedCamera
  8. =============
  9. **Inherits:** :ref:`Camera<class_Camera>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A :ref:`Camera<class_Camera>` that includes collision.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This node extends :ref:`Camera<class_Camera>` to add collisions with :ref:`Area<class_Area>` and/or :ref:`PhysicsBody<class_PhysicsBody>` nodes. The camera cannot move through colliding objects.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +----------------------------------------------------+--------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`clip_to_areas<class_ClippedCamera_property_clip_to_areas>` | ``false`` |
  22. +----------------------------------------------------+--------------------------------------------------------------------+-----------+
  23. | :ref:`bool<class_bool>` | :ref:`clip_to_bodies<class_ClippedCamera_property_clip_to_bodies>` | ``true`` |
  24. +----------------------------------------------------+--------------------------------------------------------------------+-----------+
  25. | :ref:`int<class_int>` | :ref:`collision_mask<class_ClippedCamera_property_collision_mask>` | ``1`` |
  26. +----------------------------------------------------+--------------------------------------------------------------------+-----------+
  27. | :ref:`float<class_float>` | :ref:`margin<class_ClippedCamera_property_margin>` | ``0.0`` |
  28. +----------------------------------------------------+--------------------------------------------------------------------+-----------+
  29. | :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` | :ref:`process_mode<class_ClippedCamera_property_process_mode>` | ``0`` |
  30. +----------------------------------------------------+--------------------------------------------------------------------+-----------+
  31. .. rst-class:: classref-reftable-group
  32. Methods
  33. -------
  34. .. table::
  35. :widths: auto
  36. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`add_exception<class_ClippedCamera_method_add_exception>` **(** :ref:`Object<class_Object>` node **)** |
  38. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`add_exception_rid<class_ClippedCamera_method_add_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  40. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`clear_exceptions<class_ClippedCamera_method_clear_exceptions>` **(** **)** |
  42. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`float<class_float>` | :ref:`get_clip_offset<class_ClippedCamera_method_get_clip_offset>` **(** **)** |const| |
  44. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`get_collision_mask_bit<class_ClippedCamera_method_get_collision_mask_bit>` **(** :ref:`int<class_int>` bit **)** |const| |
  46. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`remove_exception<class_ClippedCamera_method_remove_exception>` **(** :ref:`Object<class_Object>` node **)** |
  48. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`remove_exception_rid<class_ClippedCamera_method_remove_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  50. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`set_collision_mask_bit<class_ClippedCamera_method_set_collision_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
  52. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. .. rst-class:: classref-section-separator
  54. ----
  55. .. rst-class:: classref-descriptions-group
  56. Enumerations
  57. ------------
  58. .. _enum_ClippedCamera_ProcessMode:
  59. .. rst-class:: classref-enumeration
  60. enum **ProcessMode**:
  61. .. _class_ClippedCamera_constant_CLIP_PROCESS_PHYSICS:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **CLIP_PROCESS_PHYSICS** = ``0``
  64. The camera updates with the ``_physics_process`` callback.
  65. .. _class_ClippedCamera_constant_CLIP_PROCESS_IDLE:
  66. .. rst-class:: classref-enumeration-constant
  67. :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **CLIP_PROCESS_IDLE** = ``1``
  68. The camera updates with the ``_process`` callback.
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Property Descriptions
  73. ---------------------
  74. .. _class_ClippedCamera_property_clip_to_areas:
  75. .. rst-class:: classref-property
  76. :ref:`bool<class_bool>` **clip_to_areas** = ``false``
  77. .. rst-class:: classref-property-setget
  78. - void **set_clip_to_areas** **(** :ref:`bool<class_bool>` value **)**
  79. - :ref:`bool<class_bool>` **is_clip_to_areas_enabled** **(** **)**
  80. If ``true``, the camera stops on contact with :ref:`Area<class_Area>`\ s.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_ClippedCamera_property_clip_to_bodies:
  84. .. rst-class:: classref-property
  85. :ref:`bool<class_bool>` **clip_to_bodies** = ``true``
  86. .. rst-class:: classref-property-setget
  87. - void **set_clip_to_bodies** **(** :ref:`bool<class_bool>` value **)**
  88. - :ref:`bool<class_bool>` **is_clip_to_bodies_enabled** **(** **)**
  89. If ``true``, the camera stops on contact with :ref:`PhysicsBody<class_PhysicsBody>`\ s.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _class_ClippedCamera_property_collision_mask:
  93. .. rst-class:: classref-property
  94. :ref:`int<class_int>` **collision_mask** = ``1``
  95. .. rst-class:: classref-property-setget
  96. - void **set_collision_mask** **(** :ref:`int<class_int>` value **)**
  97. - :ref:`int<class_int>` **get_collision_mask** **(** **)**
  98. The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_ClippedCamera_property_margin:
  102. .. rst-class:: classref-property
  103. :ref:`float<class_float>` **margin** = ``0.0``
  104. .. rst-class:: classref-property-setget
  105. - void **set_margin** **(** :ref:`float<class_float>` value **)**
  106. - :ref:`float<class_float>` **get_margin** **(** **)**
  107. The camera's collision margin. The camera can't get closer than this distance to a colliding object.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _class_ClippedCamera_property_process_mode:
  111. .. rst-class:: classref-property
  112. :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **process_mode** = ``0``
  113. .. rst-class:: classref-property-setget
  114. - void **set_process_mode** **(** :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` value **)**
  115. - :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **get_process_mode** **(** **)**
  116. The camera's process callback. See :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>`.
  117. .. rst-class:: classref-section-separator
  118. ----
  119. .. rst-class:: classref-descriptions-group
  120. Method Descriptions
  121. -------------------
  122. .. _class_ClippedCamera_method_add_exception:
  123. .. rst-class:: classref-method
  124. void **add_exception** **(** :ref:`Object<class_Object>` node **)**
  125. Adds a collision exception so the camera does not collide with the specified node.
  126. .. rst-class:: classref-item-separator
  127. ----
  128. .. _class_ClippedCamera_method_add_exception_rid:
  129. .. rst-class:: classref-method
  130. void **add_exception_rid** **(** :ref:`RID<class_RID>` rid **)**
  131. Adds a collision exception so the camera does not collide with the specified :ref:`RID<class_RID>`.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_ClippedCamera_method_clear_exceptions:
  135. .. rst-class:: classref-method
  136. void **clear_exceptions** **(** **)**
  137. Removes all collision exceptions.
  138. .. rst-class:: classref-item-separator
  139. ----
  140. .. _class_ClippedCamera_method_get_clip_offset:
  141. .. rst-class:: classref-method
  142. :ref:`float<class_float>` **get_clip_offset** **(** **)** |const|
  143. Returns the distance the camera has been offset due to a collision.
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _class_ClippedCamera_method_get_collision_mask_bit:
  147. .. rst-class:: classref-method
  148. :ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** |const|
  149. Returns ``true`` if the specified bit index is on.
  150. \ **Note:** Bit indices range from 0-19.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_ClippedCamera_method_remove_exception:
  154. .. rst-class:: classref-method
  155. void **remove_exception** **(** :ref:`Object<class_Object>` node **)**
  156. Removes a collision exception with the specified node.
  157. .. rst-class:: classref-item-separator
  158. ----
  159. .. _class_ClippedCamera_method_remove_exception_rid:
  160. .. rst-class:: classref-method
  161. void **remove_exception_rid** **(** :ref:`RID<class_RID>` rid **)**
  162. Removes a collision exception with the specified :ref:`RID<class_RID>`.
  163. .. rst-class:: classref-item-separator
  164. ----
  165. .. _class_ClippedCamera_method_set_collision_mask_bit:
  166. .. rst-class:: classref-method
  167. void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
  168. Sets the specified bit index to the ``value``.
  169. \ **Note:** Bit indices range from 0-19.
  170. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  171. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  172. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  173. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`