feat: tweaks and work on enemy car

This commit is contained in:
Sara 2024-05-23 15:57:09 +02:00
parent c8e9e2fb4d
commit a8f7bd20db
24 changed files with 430 additions and 54 deletions

View file

@ -0,0 +1,27 @@
[gd_scene load_steps=4 format=3 uid="uid://g5cbht0novdc"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_36cjj"]
shading_mode = 0
albedo_color = Color(0.535553, 0.57272, 1, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_2fqgx"]
material = SubResource("StandardMaterial3D_36cjj")
radius = 0.195
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_v1t6q"]
radius = 0.308023
[node name="Beam" type="Beam"]
collision_layer = 0
collision_mask = 4
monitoring = false
monitorable = false
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("CapsuleMesh_2fqgx")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
shape = SubResource("CapsuleShape3D_v1t6q")
disabled = true

View file

@ -0,0 +1,25 @@
[gd_scene load_steps=4 format=3 uid="uid://b74cqcryut76c"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_36cjj"]
shading_mode = 0
albedo_color = Color(0.227451, 0.827451, 0.678431, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_2fqgx"]
material = SubResource("StandardMaterial3D_36cjj")
radius = 0.39
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_v1t6q"]
radius = 0.308023
[node name="Beam" type="Beam"]
collision_layer = 0
collision_mask = 4
monitorable = false
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("CapsuleMesh_2fqgx")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
shape = SubResource("CapsuleShape3D_v1t6q")

View file

@ -8,6 +8,7 @@ albedo_color = Color(0.227451, 0.827451, 0.678431, 1)
material = SubResource("StandardMaterial3D_36cjj")
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_v1t6q"]
radius = 0.0869471
[node name="Beam" type="Beam"]
collision_layer = 0

View file

@ -1,5 +1,6 @@
[gd_scene load_steps=13 format=3 uid="uid://dkvgi7x2epurk"]
[gd_scene load_steps=14 format=3 uid="uid://dkvgi7x2epurk"]
[ext_resource type="PackedScene" uid="uid://1eawpg0buvah" path="res://GameObjects/player_turret.tscn" id="1_ing2c"]
[ext_resource type="PackedScene" uid="uid://bm2mavtmnbaw1" path="res://Models/CarParts/SM_Veh_Hatch_01.fbx" id="1_tymeg"]
[ext_resource type="PackedScene" uid="uid://cr1ytl0o43ftv" path="res://GameObjects/beacon_powerup.tscn" id="1_uhbx0"]
[ext_resource type="PackedScene" uid="uid://bfq7ipx01ag7p" path="res://Models/CarParts/SM_Veh_Hatch_01_Bonnet_01.fbx" id="2_l8ox5"]
@ -22,13 +23,14 @@ rough = true
absorbent = true
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_4xe1s"]
points = PackedVector3Array(-1, -0.6, -2.11, 1, -0.6, -2.11, -1, -0.6, 1.405, 1, -0.6, 1.405, 0.76, -0.6, 2.065, -0.76, -0.6, 2.065, -0.74, 0.555, -1.74, 0.74, 0.555, -1.74, -0.665, 0.585, 0, 0.665, 0.585, 0, 0.665, -0.085, 1.88, -0.665, -0.085, 1.88)
points = PackedVector3Array(-1.155, -0.6, -3.48, 1.155, -0.6, -3.48, -1.155, -0.6, 1.405, 1.155, -0.6, 1.405, 1.155, -0.6, 2.81, -1.155, -0.6, 2.81, -1.155, 1.16, -3.48, 1.155, 1.16, -3.48, -1.155, 1.16, 0.65, 1.155, 1.16, 0.65, 1.155, 0.335, 2.81, -1.155, 0.335, 2.81)
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_p38n5"]
radius = 0.48558
height = 2.765
[node name="CarPlayer" type="CarPlayer"]
turret_scene = ExtResource("1_uhbx0")
turret_scene = ExtResource("1_ing2c")
beacon_scene = ExtResource("1_uhbx0")
shield_scene = ExtResource("1_uhbx0")
oversteer_curve = SubResource("Curve_dpk6q")

View file

@ -2,7 +2,8 @@
[sub_resource type="Animation" id="Animation_xagif"]
resource_name = "explode"
length = 0.4
length = 0.05
step = 0.01
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@ -10,10 +11,10 @@ tracks/0/path = NodePath("CollisionShape3D:shape:radius")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.4),
"times": PackedFloat32Array(0, 0.05),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.001, 10.0]
"values": [0.001, 2.0]
}
tracks/1/type = "value"
tracks/1/imported = false
@ -22,10 +23,10 @@ tracks/1/path = NodePath("MeshInstance3D:mesh:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.4),
"times": PackedFloat32Array(0, 0.05),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.5, 10.0]
"values": [0.5, 4.0]
}
tracks/2/type = "value"
tracks/2/imported = false
@ -34,10 +35,10 @@ tracks/2/path = NodePath("MeshInstance3D:mesh:height")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.4),
"times": PackedFloat32Array(0, 0.05),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [1.0, 20.0]
"values": [1.0, 8.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_eacvo"]

View file

@ -0,0 +1,67 @@
[gd_scene load_steps=7 format=3 uid="uid://b3p3ikural0cq"]
[ext_resource type="PackedScene" uid="uid://dsi3prgr34t85" path="res://Models/SM_Veh_Armored_Truck_01.fbx" id="1_2m0nm"]
[sub_resource type="Curve" id="Curve_dpk6q"]
_data = [Vector2(0.962441, 0), 0.0, 0.0, 0, 0, Vector2(1, 0.32967), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="Curve" id="Curve_htvme"]
_data = [Vector2(0.683099, 0), 0.0, 0.0, 0, 0, Vector2(0.823944, 0.230769), 0.0615885, 0.0615885, 0, 0]
point_count = 2
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_vwjm3"]
friction = 0.0
rough = true
absorbent = true
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_4xe1s"]
points = PackedVector3Array(-1.155, -0.6, -3.48, 1.155, -0.6, -3.48, -1.155, -0.6, 1.405, 1.155, -0.6, 1.405, 1.155, -0.6, 2.81, -1.155, -0.6, 2.81, -1.155, 1.16, -3.48, 1.155, 1.16, -3.48, -1.155, 1.16, 0.65, 1.155, 1.16, 0.65, 1.155, 0.335, 2.81, -1.155, 0.335, 2.81)
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_p38n5"]
radius = 0.48558
height = 2.765
[node name="EnemyCar" type="EnemyCar"]
oversteer_curve = SubResource("Curve_dpk6q")
oversteer_curve_x_scale = 40.0
understeer_curve = SubResource("Curve_htvme")
understeer_curve_x_scale = 40.0
max_slide_speed = 10.0
oversteer_speed_penalty = 10.0
collision_layer = 7
collision_mask = 3
mass = 1000.0
physics_material_override = SubResource("PhysicsMaterial_vwjm3")
center_of_mass_mode = 1
center_of_mass = Vector3(0, 0.2, 0)
can_sleep = false
custom_integrator = true
continuous_cd = true
max_contacts_reported = 128
contact_monitor = true
linear_damp_mode = 1
linear_damp = 0.5
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-1, -2.02334e-08, -8.50491e-08, -2.87879e-08, 0.994803, 0.10182, 8.25469e-08, 0.10182, -0.994803, 4.6449e-07, 2.24116, -4.7912)
fov = 68.9128
[node name="Body" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.27103, 0.174572)
shape = SubResource("ConvexPolygonShape3D_4xe1s")
[node name="FrontWheels" type="CollisionShape3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0.466215, 1.97394)
shape = SubResource("CapsuleShape3D_p38n5")
[node name="BackWheels" type="CollisionShape3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0.466215, -2.11718)
shape = SubResource("CapsuleShape3D_p38n5")
[node name="RoofSlot" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.31348, -0.510359)
[node name="Root Scene" parent="." instance=ExtResource("1_2m0nm")]
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]

View file

@ -8,7 +8,7 @@ top_radius = 0.055
height = 0.39
[sub_resource type="SphereShape3D" id="SphereShape3D_rdc8b"]
radius = 167.996
radius = 61.2859
[sub_resource type="BoxMesh" id="BoxMesh_ag1t0"]
size = Vector3(0.205, 1, 0.83)
@ -19,27 +19,29 @@ radius = 0.392821
[node name="Turret" type="Turret"]
attack_classes = [&"EnemyTargetBody"]
beam_scene = ExtResource("1_xm6id")
fire_time = 0.2
charge_time = 0.0
lock_time = 0.5
collision_layer = 0
collision_mask = 0
can_sleep = false
freeze = true
freeze_mode = 1
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0758235, 0)
mesh = SubResource("CylinderMesh_1btvq")
[node name="AwarenessArea" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -15.7959, 0)
collision_layer = 0
collision_mask = 2
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="AwarenessArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 13.9111, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.33142, -0.152048)
shape = SubResource("SphereShape3D_rdc8b")
[node name="Gun" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.273896, 0)
top_level = true
[node name="Root Scene" parent="Gun" instance=ExtResource("2_vsdye")]
transform = Transform3D(1.30858, 0, 0, 0, 1.30858, 0, 0, 0, 1.30858, 0.00200939, -0.12911, -0.0137266)

View file

@ -19,8 +19,14 @@ size = Vector3(0.205, 1, 0.83)
[node name="Turret" type="Turret"]
attack_classes = [&"CarPlayer"]
beam_scene = ExtResource("1_7e7bw")
collision_layer = 11
collision_mask = 11
collision_layer = 9
collision_mask = 9
axis_lock_linear_x = true
axis_lock_linear_y = true
axis_lock_linear_z = true
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
freeze = true
freeze_mode = 1