Group Look At (3D)
Allows for multiple targets to be looked at. The Pcam3D
will create a AABB
that surrounds the targets and will look at the centre of it.
Video Example
Properties
look_at_targets
Type: Array[Node3D]
Default: null
Defines the group of targets that the camera should be looking at. It will be looking at the centre of all the assigned targets.
Setter
void
set_look_at_targets(Array[Node3D]
targets)
void
append_look_at_targets(Node3D
target)
void
append_look_at_targets_array(Array[Node3D]
targets)
void
erase_look_at_targets(Node3D
target)
Example
# Assigns a new array of nodes to the Look At Group
pcam.set_look_at_targets(targets)
# Appends one node to the Look At Group
pcam.append_look_at_targets(target)
# Appends an array of nodes to the Look At Group
pcam.append_look_at_targets_array(targets)
# Removes a node from the Look At Group
pcam.erase_look_at_targets(target)
look_at_offset
Type: Vector3
Default: null
Offsets the target's Vector3
position that the PCam3D
is looking at.
Setter
void
set_look_at_offset(Vector3
offset)
Example
pcam.set_look_at_offset(Vector3(0.5, 2.5, 0))
look_at_damping
Type: bool
Default: false
Applies a damping effect on the Camera3D
's rotation. Leading to heavier / slower camera turning as the targeted node moves around.
This is useful to avoid sharp and rapid camera rotational movement.
look_at_damping_value
Type: float
Default: false
Defines the damping amount. The ideal range should be somewhere between 0-1, likely somewhere around 0.1-0.25.
Lower value = faster / sharper camera movement. Higher value = slower / heavier camera movement.
Setter
void
set_look_at_damping_value(float
damping_value)
Example
pcam.set_look_at_damping_value(true)