Tweak engine power

soundtrack
Ensar Sarajčić 2021-11-13 12:53:59 +01:00
parent 6281358f47
commit 193c1697a7
3 changed files with 3 additions and 3 deletions

View File

@ -14,11 +14,11 @@ extents = Vector3( 0.417676, 0.42291, 1.58775 )
[sub_resource type="AudioStreamGenerator" id=2] [sub_resource type="AudioStreamGenerator" id=2]
mix_rate = 5500.0 mix_rate = 5500.0
buffer_length = 1.0
[node name="beetlecar" instance=ExtResource( 2 )] [node name="beetlecar" instance=ExtResource( 2 )]
mass = 140.0 mass = 140.0
script = ExtResource( 1 ) script = ExtResource( 1 )
BASE_ENGINE_PITCH = 0.2
gear_ratios = [ 2.24, 2.0, 1.89, 1.67, 1.44, 1.23 ] gear_ratios = [ 2.24, 2.0, 1.89, 1.67, 1.44, 1.23 ]
final_drive = 5.6 final_drive = 5.6
max_rpm = 8000.0 max_rpm = 8000.0

View File

@ -93,7 +93,7 @@ func _physics_process(delta: float):
var transmission_rpm = final_rpm * abs(_get_gear_ratio()) var transmission_rpm = final_rpm * abs(_get_gear_ratio())
if gear != 0: if gear != 0:
rpm = lerp(rpm, transmission_rpm, delta * (1 - clutch_position)) rpm = lerp(rpm, transmission_rpm, delta * 10 * (1 - clutch_position))
rpm = _lerp_rpm(rpm, min_rpm, delta, delta * clutch_position) rpm = _lerp_rpm(rpm, min_rpm, delta, delta * clutch_position)
else: else:
rpm = _lerp_rpm(rpm, min_rpm, delta, delta) rpm = _lerp_rpm(rpm, min_rpm, delta, delta)

View File

@ -4,7 +4,7 @@
[ext_resource path="res://vehicles/buggy.gd" type="Script" id=3] [ext_resource path="res://vehicles/buggy.gd" type="Script" id=3]
[sub_resource type="Curve" id=2] [sub_resource type="Curve" id=2]
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0660377, 0.243255 ), 0.0, 0.0, 0, 0, Vector2( 0.240566, 0.315982 ), 0.0, 0.0, 0, 0, Vector2( 0.429245, 0.925073 ), 0.0, 0.0, 0, 0, Vector2( 0.900943, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] _data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0660377, 0.243255 ), 0.0, 0.0, 0, 0, Vector2( 0.240566, 0.315982 ), 0.0, 0.0, 0, 0, Vector2( 0.45283, 0.927273 ), 0.0, 0.0, 0, 0, Vector2( 0.891509, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="Curve" id=4] [sub_resource type="Curve" id=4]
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0849057, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.15566, 0.746591 ), 0.0, 0.0, 0, 0, Vector2( 0.349057, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.382075, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.400943, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.438679, 0 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ] _data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0849057, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.15566, 0.746591 ), 0.0, 0.0, 0, 0, Vector2( 0.349057, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.382075, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.400943, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.438679, 0 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ]