From 54ac5fe2f9788c449a867d253f34536b3cfe800d Mon Sep 17 00:00:00 2001 From: perivesta <> Date: Sun, 9 Jul 2023 19:04:56 +0200 Subject: remove debug prints --- Scripts/car_behaviour.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Scripts/car_behaviour.gd') 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 -- cgit