From dd93cc21d4f8510b5fed0c2dbb6fe469b238e02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20V=C3=A1squez=20P=C3=A9rez?= Date: Fri, 6 Dec 2024 15:20:52 -0800 Subject: [PATCH] Changed camera system to use sample_baked and get_sample_offset curve functions to get its location --- Scripts/Camera.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/Camera.gd b/Scripts/Camera.gd index 3dc1a31..8440192 100644 --- a/Scripts/Camera.gd +++ b/Scripts/Camera.gd @@ -18,7 +18,8 @@ func seek_target(): func constraint_to_rail(): - position = rail.curve.get_closest_point( target.position ) + position = rail.curve.sample_baked( rail.curve.get_closest_offset( target.position ) ) + #position = rail.curve.get_closest_point( target.position ) func _ready(): init()