Add cockpits to bugmobile and beetlecar
This commit is contained in:
parent
2e44a97f63
commit
2417e50544
20 changed files with 69 additions and 10 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/DarkGlass.material
Normal file
BIN
assets/DarkGlass.material
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,8 +1,11 @@
|
|||
[gd_scene load_steps=13 format=2]
|
||||
[gd_scene load_steps=16 format=2]
|
||||
|
||||
[ext_resource path="res://vehicles/vehicle.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/beetlecar.glb" type="PackedScene" id=2]
|
||||
[ext_resource path="res://vehicles/tire_smoke.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://vehicles/pedal.gd" type="Script" id=4]
|
||||
[ext_resource path="res://vehicles/meter.gd" type="Script" id=5]
|
||||
[ext_resource path="res://vehicles/steering_controller.gd" type="Script" id=6]
|
||||
|
||||
[sub_resource type="Curve" id=3]
|
||||
_data = [ Vector2( 0, 0 ), 0.0, 3.60634, 0, 1, Vector2( 0.15566, 0.561364 ), 1.56017, 1.56017, 0, 0, Vector2( 0.830189, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
|
||||
|
@ -70,6 +73,26 @@ suspension_stiffness = 12.0
|
|||
damping_compression = 0.75
|
||||
damping_relaxation = 0.8
|
||||
|
||||
[node name="brake_pedal" parent="chassis/cockpit" index="0"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="clutch_pedal" parent="chassis/cockpit" index="1"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="gas_pedal" parent="chassis/cockpit" index="2"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="rpm_meter" parent="chassis/cockpit" index="3"]
|
||||
script = ExtResource( 5 )
|
||||
needle_path = NodePath("rpm_needle")
|
||||
|
||||
[node name="speed_meter" parent="chassis/cockpit" index="4"]
|
||||
script = ExtResource( 5 )
|
||||
needle_path = NodePath("speed_needle")
|
||||
|
||||
[node name="steering_controller" parent="chassis/cockpit" index="5"]
|
||||
script = ExtResource( 6 )
|
||||
|
||||
[node name="rear_left" parent="." index="3"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, 0.621506, 0.375, -0.83483 )
|
||||
use_as_traction = true
|
||||
|
@ -141,7 +164,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.621508, 0.0502438, 1.19336
|
|||
transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, 0.621506, 0.0502438, 1.19336 )
|
||||
|
||||
[node name="cockpit" type="Position3D" parent="." index="13"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.159514, 0.993516, 0.421211 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.122976, 1.13133, 0.315432 )
|
||||
|
||||
[node name="hood" type="Position3D" parent="." index="14"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.01256, 0.87905 )
|
||||
|
@ -151,3 +174,10 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.535274, 1.89154 )
|
|||
|
||||
[node name="static_follow" type="Position3D" parent="." index="16"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.59115, -3.01375 )
|
||||
|
||||
[connection signal="brake_updated" from="." to="chassis/cockpit/brake_pedal" method="_on_value_updated"]
|
||||
[connection signal="clutch_updated" from="." to="chassis/cockpit/clutch_pedal" method="_on_value_updated"]
|
||||
[connection signal="rpm_updated" from="." to="chassis/cockpit/rpm_meter" method="_on_value_updated"]
|
||||
[connection signal="speed_updated" from="." to="chassis/cockpit/speed_meter" method="_on_value_updated"]
|
||||
[connection signal="steering_updated" from="." to="chassis/cockpit/steering_controller" method="_on_steering_updated"]
|
||||
[connection signal="throttle_updated" from="." to="chassis/cockpit/gas_pedal" method="_on_value_updated"]
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
[gd_scene load_steps=17 format=2]
|
||||
[gd_scene load_steps=16 format=2]
|
||||
|
||||
[ext_resource path="res://assets/basic_buggy.glb" type="PackedScene" id=1]
|
||||
[ext_resource path="res://vehicles/tire_smoke.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://vehicles/vehicle.gd" type="Script" id=3]
|
||||
[ext_resource path="res://vehicles/steering_controller.gd" type="Script" id=4]
|
||||
[ext_resource path="res://vehicles/meter.gd" type="Script" id=5]
|
||||
[ext_resource path="res://vehicles/pedal.gd" type="Script" id=6]
|
||||
[ext_resource path="res://vehicles/pedal.gd" type="Script" id=7]
|
||||
|
||||
[sub_resource type="Curve" id=2]
|
||||
|
@ -63,13 +62,13 @@ automatic_gear_up_threshold = 0.85
|
|||
automatic_gear_down_threshold = 0.4
|
||||
|
||||
[node name="brake_pedal" parent="chassis/cockpit" index="0"]
|
||||
script = ExtResource( 6 )
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="clutch_pedal" parent="chassis/cockpit" index="1"]
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="gas_pedal" parent="chassis/cockpit" index="2"]
|
||||
script = ExtResource( 6 )
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="rpm_meter" parent="chassis/cockpit" index="3"]
|
||||
transform = Transform( 1, 0, 0, 0, 0.351842, 0.93606, 0, -0.93606, 0.351842, 0.036114, 0.360487, 0.695986 )
|
||||
|
@ -172,7 +171,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.950753, -0.0380455, -1.41438
|
|||
transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, -0.950755, -0.038045, -1.41438 )
|
||||
|
||||
[node name="cockpit" type="Position3D" parent="." index="13"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.32501, -0.0235026 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.44962, 0.200323 )
|
||||
|
||||
[node name="hood" type="Position3D" parent="." index="14"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.31056, 0.894584 )
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
[gd_scene load_steps=15 format=2]
|
||||
[gd_scene load_steps=18 format=2]
|
||||
|
||||
[ext_resource path="res://vehicles/tire_smoke.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://assets/bugmobile.glb" type="PackedScene" id=2]
|
||||
[ext_resource path="res://vehicles/vehicle.gd" type="Script" id=3]
|
||||
[ext_resource path="res://vehicles/steering_controller.gd" type="Script" id=4]
|
||||
[ext_resource path="res://vehicles/pedal.gd" type="Script" id=5]
|
||||
[ext_resource path="res://vehicles/meter.gd" type="Script" id=6]
|
||||
|
||||
[sub_resource type="Curve" id=18]
|
||||
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.179245, 0.584091 ), 4.91185, 4.91185, 0, 0, Vector2( 0.603774, 0.954545 ), 6.05975, 6.05975, 0, 0, Vector2( 0.806604, 0.989773 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
|
||||
|
@ -89,6 +92,26 @@ suspension_max_force = 7000.0
|
|||
damping_compression = 0.9
|
||||
damping_relaxation = 0.92
|
||||
|
||||
[node name="brake_pedal" parent="chassis/cockpit" index="0"]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="clutch_pedal" parent="chassis/cockpit" index="1"]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="gas_pedal" parent="chassis/cockpit" index="2"]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="steering_controller" parent="chassis/cockpit" index="3"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="rpm_meter" parent="chassis/cockpit/steering_controller" index="0"]
|
||||
script = ExtResource( 6 )
|
||||
needle_path = NodePath("rpm_needle")
|
||||
|
||||
[node name="speed_meter" parent="chassis/cockpit/steering_controller" index="1"]
|
||||
script = ExtResource( 6 )
|
||||
needle_path = NodePath("speed_needle")
|
||||
|
||||
[node name="front_right" parent="." index="4"]
|
||||
use_as_steering = true
|
||||
wheel_radius = 0.35
|
||||
|
@ -140,7 +163,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.18159, 0.117865, -1.93644 )
|
|||
transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, -1.02536, 0.101852, -1.93766 )
|
||||
|
||||
[node name="cockpit" type="Position3D" parent="." index="13"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.265389, 1.1411, 0.337731 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.03657, 0 )
|
||||
|
||||
[node name="hood" type="Position3D" parent="." index="14"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.00873, 0.756477 )
|
||||
|
@ -150,3 +173,10 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.605405, 1.5324 )
|
|||
|
||||
[node name="static_follow" type="Position3D" parent="." index="16"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.88984, -4.78212 )
|
||||
|
||||
[connection signal="brake_updated" from="." to="chassis/cockpit/brake_pedal" method="_on_value_updated"]
|
||||
[connection signal="clutch_updated" from="." to="chassis/cockpit/clutch_pedal" method="_on_value_updated"]
|
||||
[connection signal="rpm_updated" from="." to="chassis/cockpit/steering_controller/rpm_meter" method="_on_value_updated"]
|
||||
[connection signal="speed_updated" from="." to="chassis/cockpit/steering_controller/speed_meter" method="_on_value_updated"]
|
||||
[connection signal="steering_updated" from="." to="chassis/cockpit/steering_controller" method="_on_steering_updated"]
|
||||
[connection signal="throttle_updated" from="." to="chassis/cockpit/gas_pedal" method="_on_value_updated"]
|
||||
|
|
|
@ -8,4 +8,4 @@ func update_angle(steering_angle_percent: float) -> void:
|
|||
|
||||
|
||||
func _on_steering_updated(_steering_angle: float, steering_angle_percent: float) -> void:
|
||||
update_angle(-steering_angle_percent)
|
||||
update_angle(steering_angle_percent)
|
||||
|
|
Loading…
Add table
Reference in a new issue