:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/ClippedCamera.xml. .. _class_ClippedCamera: ClippedCamera ============= **Inherits:** :ref:`Camera` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` A :ref:`Camera` that includes collision. Description ----------- This node extends :ref:`Camera` to add collisions with :ref:`Area` and/or :ref:`PhysicsBody` nodes. The camera cannot move through colliding objects. Properties ---------- +----------------------------------------------------+--------------------------------------------------------------------+-----------+ | :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`` | +----------------------------------------------------+--------------------------------------------------------------------+-----------+ Methods ------- +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 **)** | +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_ClippedCamera_ProcessMode: .. _class_ClippedCamera_constant_CLIP_PROCESS_PHYSICS: .. _class_ClippedCamera_constant_CLIP_PROCESS_IDLE: enum **ProcessMode**: - **CLIP_PROCESS_PHYSICS** = **0** --- The camera updates with the ``_physics_process`` callback. - **CLIP_PROCESS_IDLE** = **1** --- The camera updates with the ``_process`` callback. Property Descriptions --------------------- .. _class_ClippedCamera_property_clip_to_areas: - :ref:`bool` **clip_to_areas** +-----------+----------------------------+ | *Default* | ``false`` | +-----------+----------------------------+ | *Setter* | set_clip_to_areas(value) | +-----------+----------------------------+ | *Getter* | is_clip_to_areas_enabled() | +-----------+----------------------------+ If ``true``, the camera stops on contact with :ref:`Area`\ s. ---- .. _class_ClippedCamera_property_clip_to_bodies: - :ref:`bool` **clip_to_bodies** +-----------+-----------------------------+ | *Default* | ``true`` | +-----------+-----------------------------+ | *Setter* | set_clip_to_bodies(value) | +-----------+-----------------------------+ | *Getter* | is_clip_to_bodies_enabled() | +-----------+-----------------------------+ If ``true``, the camera stops on contact with :ref:`PhysicsBody`\ s. ---- .. _class_ClippedCamera_property_collision_mask: - :ref:`int` **collision_mask** +-----------+---------------------------+ | *Default* | ``1`` | +-----------+---------------------------+ | *Setter* | set_collision_mask(value) | +-----------+---------------------------+ | *Getter* | 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. ---- .. _class_ClippedCamera_property_margin: - :ref:`float` **margin** +-----------+-------------------+ | *Default* | ``0.0`` | +-----------+-------------------+ | *Setter* | set_margin(value) | +-----------+-------------------+ | *Getter* | get_margin() | +-----------+-------------------+ The camera's collision margin. The camera can't get closer than this distance to a colliding object. ---- .. _class_ClippedCamera_property_process_mode: - :ref:`ProcessMode` **process_mode** +-----------+-------------------------+ | *Default* | ``0`` | +-----------+-------------------------+ | *Setter* | set_process_mode(value) | +-----------+-------------------------+ | *Getter* | get_process_mode() | +-----------+-------------------------+ The camera's process callback. See :ref:`ProcessMode`. Method Descriptions ------------------- .. _class_ClippedCamera_method_add_exception: - void **add_exception** **(** :ref:`Object` node **)** Adds a collision exception so the camera does not collide with the specified node. ---- .. _class_ClippedCamera_method_add_exception_rid: - void **add_exception_rid** **(** :ref:`RID` rid **)** Adds a collision exception so the camera does not collide with the specified :ref:`RID`. ---- .. _class_ClippedCamera_method_clear_exceptions: - void **clear_exceptions** **(** **)** Removes all collision exceptions. ---- .. _class_ClippedCamera_method_get_clip_offset: - :ref:`float` **get_clip_offset** **(** **)** |const| Returns the distance the camera has been offset due to a collision. ---- .. _class_ClippedCamera_method_get_collision_mask_bit: - :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. ---- .. _class_ClippedCamera_method_remove_exception: - void **remove_exception** **(** :ref:`Object` node **)** Removes a collision exception with the specified node. ---- .. _class_ClippedCamera_method_remove_exception_rid: - void **remove_exception_rid** **(** :ref:`RID` rid **)** Removes a collision exception with the specified :ref:`RID`. ---- .. _class_ClippedCamera_method_set_collision_mask_bit: - 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.)`