WIP documenting ExtendedCamera
This commit is contained in:
parent
db47722881
commit
2e763728d3
3 changed files with 14 additions and 5 deletions
|
@ -1,17 +1,23 @@
|
|||
extends Camera2D
|
||||
class_name ExtendedCamera
|
||||
|
||||
# TODO: look-down/up
|
||||
# TODO: add documentation here!
|
||||
## Camera System, General idea:
|
||||
## A stack of applied cameras are kept, updated as functions are called.
|
||||
## The transition is interpolated, that is most attributes
|
||||
|
||||
# Camera System, General idea:
|
||||
# A stack of applied cameras are kept, updated as functions are called.
|
||||
# The transition is interpolated, that is most attributes
|
||||
# TODO: look-down/up
|
||||
# TODO: implement transition interpolation for most attributes
|
||||
|
||||
## When switching cameras, this is the timeframe for all interpolation.
|
||||
@export var camera_transition_time: float
|
||||
## The initial camera this camera inherits it's properites from.
|
||||
@export var follow_camera: ExtendedCamera
|
||||
## X: time TODO weird
|
||||
@export var transition_speed_curve: Curve
|
||||
|
||||
## Whether camera pans when looking a certain direction.
|
||||
@export var look_aside_enabled: bool
|
||||
|
||||
## The x distance which the camera looks away from the player in the direction
|
||||
## the player is facing
|
||||
@export
|
||||
|
|
|
@ -2701,6 +2701,7 @@ inherit_limit = true
|
|||
[node name="Detatch" type="Node" parent="."]
|
||||
|
||||
[node name="Camera" type="Camera2D" parent="Detatch" node_paths=PackedStringArray("follow_camera") groups=["affectable_camera", "flip_me"]]
|
||||
editor_description = "The games actual camera. This camera inherits its attributes from other cameras. Some attributes for in ExtendedCamera is typically designed for this node."
|
||||
process_callback = 0
|
||||
limit_smoothed = true
|
||||
position_smoothing_enabled = true
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
extends ExtendedCamera
|
||||
|
||||
## A camera that automatically applies itself to actors at instanciation.
|
||||
|
||||
func _ready():
|
||||
for n in get_tree().get_nodes_in_group("affectable_camera"):
|
||||
n.apply_camera(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue