Simple Look At (3D)
Rotates towards, essentially look directly at, its target with an optional offset.
Video Example
Properties
look_at_target
Type:Node3D
Default: null
Determines whichNode3D
should be looked at. ThePCam3D
will update its rotational value as the target changes its position.
look_at_offset
Type:Vector3
Default: null
Offsets the target'sVector3
position that thePCam3D
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 theCamera3D
'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)