Simple Follow
Has similar logic to Glued Follow
, but with the additional option to be offset from its target location.
This mode is useful for things like character controllers in a fixed angle perspective.
Video Examples
Properties
Follow Target
Type: Node2D
Default: null
Determines which Node
should be followed. The Camera
will follow the position of the Follow Target
based on the Follow Mode
type and its parameters.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Setter
void
set_follow_target_node(Node2D
target_node)
Example
pcam.set_follow_target_node(player_node)
Follow Target Offset
Type: Vector2
Default: Vector2(0,0)
Offsets the follow target's position.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Setter
void
set_follow_target_offset(Vector2
offset)
Example
pcam.set_follow_target_offset(Vector2(1, 1))
Damping
Type: bool
Default: false
Applies a damping effect on the Camera
's movement. Leading to heavier / slower camera movement as the targeted node moves around.
This is useful to avoid sharp and rapid camera movement.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Damping Value
Type: float
Default: 10
Defines the damping amount.
Lower value = slower / heavier camera movement.
Higher value = faster / sharper camera movement.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Setter
void
set_follow_damping_value(float
damping_value)
Example
pcam.set_follow_damping_value(5)