ClippedCamera

Inherits: Camera < Spatial < Node < Object Camera that includes collision.

Description

Camera to add collisions with Area and/or PhysicsBody nodes. The camera cannot move through colliding objects.

Properties

Methods

Enumerations

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

  • bool clip_to_areas true, the camera stops on contact with Areas.

  • bool clip_to_bodies true, the camera stops on contact with PhysicsBodys.

  • int collision_mask Collision layers and masks in the documentation for more information.

  • float margin The camera’s collision margin. The camera can’t get closer than this distance to a colliding object.

  • ProcessMode process_mode ProcessMode.

    Method Descriptions

  • add_exception ( Object node ) Adds a collision exception so the camera does not collide with the specified node.

  • add_exception_rid ( RID rid ) RID.

  • clear_exceptions ( ) Removes all collision exceptions.

  • float get_clip_offset ( ) const Returns the distance the camera has been offset due to a collision.

  • bool get_collision_mask_bit ( int bit ) const true if the specified bit index is on. Note: Bit indices range from 0-19.

  • remove_exception ( Object node ) Removes a collision exception with the specified node.

  • remove_exception_rid ( RID rid ) RID.

  • set_collision_mask_bit ( int bit, bool value ) value. Note: Bit indices range from 0-19.