Path Follow
Follows a target while being positionally confined to a Path
node. The position on the path is based on the closest baked point relative to the target's position.
Note: This can lead to sudden camera jumps if the Path
spline has steep curvatures.
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 Path
Type: Path2D
Default: null
Determines the Path
node the PCam
should be bound to. The PCam
will follow the position of the Follow Target
while sticking to the closest point on this path.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
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)