summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/CameraTrackFollower.gd10
1 files changed, 7 insertions, 3 deletions
diff --git a/components/CameraTrackFollower.gd b/components/CameraTrackFollower.gd
index 819e13b..e2d9bbe 100644
--- a/components/CameraTrackFollower.gd
+++ b/components/CameraTrackFollower.gd
@@ -7,9 +7,13 @@ signal done()
var _points
func _path(value):
path = value
- _pidx = 0
- _t = 0
- _points = value.curve.get_baked_points()
+ if path == null:
+ _points = []
+ _pidx = -1
+ else:
+ _pidx = 0
+ _t = 0
+ _points = value.curve.get_baked_points()
current_speed = 0
_done_emitted = false
print("New path set to CameraTrackFollower")