123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ClippedCamera.xml.
- .. _class_ClippedCamera:
- ClippedCamera
- =============
- **Inherits:** :ref:`Camera<class_Camera>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- A :ref:`Camera<class_Camera>` that includes collision.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- 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.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +----------------------------------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`clip_to_areas<class_ClippedCamera_property_clip_to_areas>` | ``false`` |
- +----------------------------------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`clip_to_bodies<class_ClippedCamera_property_clip_to_bodies>` | ``true`` |
- +----------------------------------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`collision_mask<class_ClippedCamera_property_collision_mask>` | ``1`` |
- +----------------------------------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`margin<class_ClippedCamera_property_margin>` | ``0.0`` |
- +----------------------------------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` | :ref:`process_mode<class_ClippedCamera_property_process_mode>` | ``0`` |
- +----------------------------------------------------+--------------------------------------------------------------------+-----------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_exception<class_ClippedCamera_method_add_exception>` **(** :ref:`Object<class_Object>` node **)** |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_exception_rid<class_ClippedCamera_method_add_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear_exceptions<class_ClippedCamera_method_clear_exceptions>` **(** **)** |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_clip_offset<class_ClippedCamera_method_get_clip_offset>` **(** **)** |const| |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`get_collision_mask_bit<class_ClippedCamera_method_get_collision_mask_bit>` **(** :ref:`int<class_int>` bit **)** |const| |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_exception<class_ClippedCamera_method_remove_exception>` **(** :ref:`Object<class_Object>` node **)** |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_exception_rid<class_ClippedCamera_method_remove_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_collision_mask_bit<class_ClippedCamera_method_set_collision_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_ClippedCamera_ProcessMode:
- .. rst-class:: classref-enumeration
- enum **ProcessMode**:
- .. _class_ClippedCamera_constant_CLIP_PROCESS_PHYSICS:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **CLIP_PROCESS_PHYSICS** = ``0``
- The camera updates with the ``_physics_process`` callback.
- .. _class_ClippedCamera_constant_CLIP_PROCESS_IDLE:
- .. rst-class:: classref-enumeration-constant
- :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **CLIP_PROCESS_IDLE** = ``1``
- The camera updates with the ``_process`` callback.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_ClippedCamera_property_clip_to_areas:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **clip_to_areas** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_clip_to_areas** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_clip_to_areas_enabled** **(** **)**
- If ``true``, the camera stops on contact with :ref:`Area<class_Area>`\ s.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_property_clip_to_bodies:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **clip_to_bodies** = ``true``
- .. rst-class:: classref-property-setget
- - void **set_clip_to_bodies** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_clip_to_bodies_enabled** **(** **)**
- If ``true``, the camera stops on contact with :ref:`PhysicsBody<class_PhysicsBody>`\ s.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_property_collision_mask:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **collision_mask** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_collision_mask** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_collision_mask** **(** **)**
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_property_margin:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **margin** = ``0.0``
- .. rst-class:: classref-property-setget
- - void **set_margin** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_margin** **(** **)**
- The camera's collision margin. The camera can't get closer than this distance to a colliding object.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_property_process_mode:
- .. rst-class:: classref-property
- :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **process_mode** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_process_mode** **(** :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` value **)**
- - :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>` **get_process_mode** **(** **)**
- The camera's process callback. See :ref:`ProcessMode<enum_ClippedCamera_ProcessMode>`.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_ClippedCamera_method_add_exception:
- .. rst-class:: classref-method
- void **add_exception** **(** :ref:`Object<class_Object>` node **)**
- Adds a collision exception so the camera does not collide with the specified node.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_add_exception_rid:
- .. rst-class:: classref-method
- void **add_exception_rid** **(** :ref:`RID<class_RID>` rid **)**
- Adds a collision exception so the camera does not collide with the specified :ref:`RID<class_RID>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_clear_exceptions:
- .. rst-class:: classref-method
- void **clear_exceptions** **(** **)**
- Removes all collision exceptions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_get_clip_offset:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **get_clip_offset** **(** **)** |const|
- Returns the distance the camera has been offset due to a collision.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_get_collision_mask_bit:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** |const|
- Returns ``true`` if the specified bit index is on.
- \ **Note:** Bit indices range from 0-19.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_remove_exception:
- .. rst-class:: classref-method
- void **remove_exception** **(** :ref:`Object<class_Object>` node **)**
- Removes a collision exception with the specified node.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_remove_exception_rid:
- .. rst-class:: classref-method
- void **remove_exception_rid** **(** :ref:`RID<class_RID>` rid **)**
- Removes a collision exception with the specified :ref:`RID<class_RID>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ClippedCamera_method_set_collision_mask_bit:
- .. rst-class:: classref-method
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
- Sets the specified bit index to the ``value``.
- \ **Note:** Bit indices range from 0-19.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|