diff options
author | perivesta <> | 2023-07-09 19:04:56 +0200 |
---|---|---|
committer | perivesta <> | 2023-07-09 19:04:56 +0200 |
commit | 54ac5fe2f9788c449a867d253f34536b3cfe800d (patch) | |
tree | bc7064652a3b8b0f9a9324f8ede5bf5c6bcaec06 /Scripts | |
parent | c8555832f0fa74803621e2d85090b267bda42f58 (diff) | |
download | 2023-54ac5fe2f9788c449a867d253f34536b3cfe800d.tar.gz 2023-54ac5fe2f9788c449a867d253f34536b3cfe800d.tar.bz2 2023-54ac5fe2f9788c449a867d253f34536b3cfe800d.zip |
remove debug prints
Diffstat (limited to '')
-rw-r--r-- | Scripts/car_behaviour.gd | 10 | ||||
-rw-r--r-- | Scripts/scene_control.gd | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Scripts/car_behaviour.gd b/Scripts/car_behaviour.gd index 1a69b37..a881363 100644 --- a/Scripts/car_behaviour.gd +++ b/Scripts/car_behaviour.gd @@ -110,22 +110,22 @@ func own_movement(delta): func own_movement_improved(delta): var desired_velocity = chosen_dir.rotated(rotation) * max_speed - print('==========') - print('current speed: ', velocity.length(), ' | current angle: ', velocity.angle()) - print('desired speed: ', desired_velocity.length(), ' | desired angle: ', desired_velocity.angle()) +# print('==========') +# print('current speed: ', velocity.length(), ' | current angle: ', velocity.angle()) +# print('desired speed: ', desired_velocity.length(), ' | desired angle: ', desired_velocity.angle()) # var possible_radius = mass * velocity.length_squared() / steer_force # var possible_steer_angle = velocity.length() / possible_radius var possible_steer_angle = steer_force / (mass * velocity.length()) var angle_change = clampf(wrapf(desired_velocity.angle() - velocity.angle(), -PI, PI), -possible_steer_angle, possible_steer_angle) var new_angle = wrapf(velocity.angle() + angle_change, -PI, PI) - print('possible_steer_angle: ', possible_steer_angle, ' | angle_change: ', angle_change, ' | new_angle: ', new_angle ) +# print('possible_steer_angle: ', possible_steer_angle, ' | angle_change: ', angle_change, ' | new_angle: ', new_angle ) var wanted_speed = steer_force / (mass * absf(desired_velocity.angle() - velocity.angle())) var new_max_speed = min(velocity.length() + (acceleration), max_speed) var new_min_speed = max(velocity.length() - (acceleration), 0) var new_speed = clampf(wanted_speed, new_min_speed, new_max_speed) - print('wanted: ', wanted_speed, ' | min: ', new_min_speed, ' | max: ', new_max_speed, ' | new: ', new_speed) +# print('wanted: ', wanted_speed, ' | min: ', new_min_speed, ' | max: ', new_max_speed, ' | new: ', new_speed) velocity = Vector2.from_angle(new_angle) * new_speed rotation = new_angle diff --git a/Scripts/scene_control.gd b/Scripts/scene_control.gd index 268c92a..b6e4a47 100644 --- a/Scripts/scene_control.gd +++ b/Scripts/scene_control.gd @@ -49,7 +49,7 @@ func get_path_next_position(pos): return path_follow.position func set_driving(driving: bool): - print('control driving: ' , driving) +# print('control driving: ' , driving) car.driving = driving is_driving = driving |