Skip to content

Commit

Permalink
Use @onready to init previous_position to prevent errors (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisl8 authored Apr 12, 2024
1 parent 6e44341 commit f70868c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 3d/truck_town/vehicles/follow_camera.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var base_fov := fov
var desired_fov := fov

# Position on the last physics frame (used to measure speed).
var previous_position := global_position
@onready var previous_position := global_position

enum CameraType {
EXTERIOR,
Expand Down

0 comments on commit f70868c

Please sign in to comment.