ClippedCamera
A Camera that includes collision.
This node extends Camera to add collisions with and/or PhysicsBody nodes. The camera cannot move through colliding objects.
Properties
void | ( Object node ) |
void | ( RID rid ) |
void | ( ) |
( ) const | |
void | ( Object node ) |
void | ( RID rid ) |
void | ( int bit, value ) |
Enumerations
enum ProcessMode:
CLIP_PROCESS_IDLE = 1 —- The camera updates with the
_process
callback.
- bool clip_to_areas
If true
, the camera stops on contact with s.
- bool clip_to_bodies
Default |
|
Setter | set_clip_to_bodies(value) |
Getter | is_clip_to_bodies_enabled() |
If , the camera stops on contact with s.
- int collision_mask
The camera’s collision mask. Only objects in at least one collision layer matching the mask will be detected. See in the documentation for more information.
- float margin
Default |
|
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.
- process_mode
The camera’s process callback. See ProcessMode.
Method Descriptions
Adds a collision exception so the camera does not collide with the specified node.
- void add_exception_rid ( RID rid )
Adds a collision exception so the camera does not collide with the specified .
- void clear_exceptions ( )
Removes all collision exceptions.
- float get_clip_offset ( ) const
Returns the distance the camera has been offset due to a collision.
- get_collision_mask_bit ( int bit ) const
Returns true
if the specified bit index is on.
Note: Bit indices range from 0-19.
- void remove_exception ( node )
Removes a collision exception with the specified node.
- void remove_exception_rid ( RID rid )
Removes a collision exception with the specified .
Sets the specified bit index to the .