Skip to content
Follow Group Icon

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
gdscript
pcam.set_follow_target_node(player_node)
Example
gdscript
pcam.set_follow_target_node(player_node)

Getter

Node2D get_follow_target_node()

Node3D get_follow_target_node()

Example
gdscript
pcam.get_follow_target_node()
Example
gdscript
pcam.get_follow_target_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.


Setter

void set_follow_path(Path2D path_name)

Example
gdscript
pcam.set_follow_path(follow_path_2d)
Example
gdscript
pcam.set_follow_path(follow_path_3d)

Getter

Vector2 get_follow_target_offset()

Vector3 get_follow_target_offset()

Example
gdscript
pcam.get_follow_path()
Example
gdscript
pcam.get_follow_path()

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.


Setter

void set_follow_has_damping(bool value)

Example
gdscript
pcam.set_follow_has_damping(true)

Getter

bool get_follow_has_damping()

Example
gdscript
pcam.get_follow_has_damping()

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
gdscript
pcam.set_follow_damping_value(5)

Getter

float get_follow_damping_value()

Example
gdscript
pcam.get_follow_damping_value()