: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` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` A :ref:`Camera` that includes collision. .. rst-class:: classref-introduction-group Description ----------- This node extends :ref:`Camera` to add collisions with :ref:`Area` and/or :ref:`PhysicsBody` nodes. The camera cannot move through colliding objects. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +----------------------------------------------------+--------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`clip_to_areas` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`clip_to_bodies` | ``true`` | +----------------------------------------------------+--------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`collision_mask` | ``1`` | +----------------------------------------------------+--------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`margin` | ``0.0`` | +----------------------------------------------------+--------------------------------------------------------------------+-----------+ | :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | +----------------------------------------------------+--------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_exception` **(** :ref:`Object` node **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_exceptions` **(** **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_clip_offset` **(** **)** |const| | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** |const| | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_exception` **(** :ref:`Object` node **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`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` **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` **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` **clip_to_areas** = ``false`` .. rst-class:: classref-property-setget - void **set_clip_to_areas** **(** :ref:`bool` value **)** - :ref:`bool` **is_clip_to_areas_enabled** **(** **)** If ``true``, the camera stops on contact with :ref:`Area`\ s. .. rst-class:: classref-item-separator ---- .. _class_ClippedCamera_property_clip_to_bodies: .. rst-class:: classref-property :ref:`bool` **clip_to_bodies** = ``true`` .. rst-class:: classref-property-setget - void **set_clip_to_bodies** **(** :ref:`bool` value **)** - :ref:`bool` **is_clip_to_bodies_enabled** **(** **)** If ``true``, the camera stops on contact with :ref:`PhysicsBody`\ s. .. rst-class:: classref-item-separator ---- .. _class_ClippedCamera_property_collision_mask: .. rst-class:: classref-property :ref:`int` **collision_mask** = ``1`` .. rst-class:: classref-property-setget - void **set_collision_mask** **(** :ref:`int` value **)** - :ref:`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` **margin** = ``0.0`` .. rst-class:: classref-property-setget - void **set_margin** **(** :ref:`float` value **)** - :ref:`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` **process_mode** = ``0`` .. rst-class:: classref-property-setget - void **set_process_mode** **(** :ref:`ProcessMode` value **)** - :ref:`ProcessMode` **get_process_mode** **(** **)** The camera's process callback. See :ref:`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` 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` rid **)** Adds a collision exception so the camera does not collide with the specified :ref:`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` **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` **get_collision_mask_bit** **(** :ref:`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` 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` rid **)** Removes a collision exception with the specified :ref:`RID`. .. rst-class:: classref-item-separator ---- .. _class_ClippedCamera_method_set_collision_mask_bit: .. rst-class:: classref-method void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`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.)`