Improve gear switching and buggy max speed
parent
8bd36dddfc
commit
82d7971153
|
@ -22,6 +22,7 @@ script = ExtResource( 1 )
|
||||||
gear_ratios = [ 2.95, 2.2, 1.76, 1.43, 1.25, 1.0 ]
|
gear_ratios = [ 2.95, 2.2, 1.76, 1.43, 1.25, 1.0 ]
|
||||||
final_drive = 5.0
|
final_drive = 5.0
|
||||||
max_rpm = 8000.0
|
max_rpm = 8000.0
|
||||||
|
gear_switch_time = 0.5
|
||||||
power_curve = SubResource( 3 )
|
power_curve = SubResource( 3 )
|
||||||
sound_curve = SubResource( 4 )
|
sound_curve = SubResource( 4 )
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,9 @@ func _physics_process(delta: float):
|
||||||
clutch_position = Input.get_action_strength("clutch")
|
clutch_position = Input.get_action_strength("clutch")
|
||||||
_handle_gear_switch(delta)
|
_handle_gear_switch(delta)
|
||||||
var throttle = Input.get_action_strength("throttle")
|
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 wheel_rpm = traction_wheels[0].get_rpm()
|
||||||
var final_rpm = abs(wheel_rpm) * final_drive
|
var final_rpm = abs(wheel_rpm) * final_drive
|
||||||
|
|
|
@ -19,6 +19,7 @@ mix_rate = 5500.0
|
||||||
mass = 150.0
|
mass = 150.0
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
BASE_ENGINE_PITCH = 0.95
|
BASE_ENGINE_PITCH = 0.95
|
||||||
|
gear_ratios = [ 3.4, 2.5, 2.0, 1.5, 1.25, 1.0 ]
|
||||||
power_curve = SubResource( 2 )
|
power_curve = SubResource( 2 )
|
||||||
sound_curve = SubResource( 4 )
|
sound_curve = SubResource( 4 )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue