Improve gear switching and buggy max speed

soundtrack
Ensar Sarajčić 2021-11-13 21:17:52 +01:00
parent 8bd36dddfc
commit 82d7971153
3 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ script = ExtResource( 1 )
gear_ratios = [ 2.95, 2.2, 1.76, 1.43, 1.25, 1.0 ]
final_drive = 5.0
max_rpm = 8000.0
gear_switch_time = 0.5
power_curve = SubResource( 3 )
sound_curve = SubResource( 4 )

View File

@ -87,6 +87,9 @@ func _physics_process(delta: float):
clutch_position = Input.get_action_strength("clutch")
_handle_gear_switch(delta)
var throttle = Input.get_action_strength("throttle")
if gear_timer > 0:
clutch_position = 1
throttle = 0
var wheel_rpm = traction_wheels[0].get_rpm()
var final_rpm = abs(wheel_rpm) * final_drive

View File

@ -19,6 +19,7 @@ mix_rate = 5500.0
mass = 150.0
script = ExtResource( 3 )
BASE_ENGINE_PITCH = 0.95
gear_ratios = [ 3.4, 2.5, 2.0, 1.5, 1.25, 1.0 ]
power_curve = SubResource( 2 )
sound_curve = SubResource( 4 )