summaryrefslogtreecommitdiff
path: root/game.tscn
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-06-06 04:25:06 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-06-06 04:25:19 +0200
commitabc27d4d6b590fbf6adb2fe136208df0ebe2deeb (patch)
treee1cb6eccc8958a99b6432faf9d2fd459d30b589c /game.tscn
parent3cb24b9d4d23b875cc7719c56cd4a664a9ec1b19 (diff)
downloadcar-abc27d4d6b590fbf6adb2fe136208df0ebe2deeb.tar.gz
Better handling, handbrake, follow camera
Diffstat (limited to 'game.tscn')
-rw-r--r--game.tscn93
1 files changed, 64 insertions, 29 deletions
diff --git a/game.tscn b/game.tscn
index 19d4749..a3878bb 100644
--- a/game.tscn
+++ b/game.tscn
@@ -1,74 +1,103 @@
-[gd_scene load_steps=11 format=2]
+[gd_scene load_steps=18 format=2]
[ext_resource path="res://car.tscn" type="PackedScene" id=1]
[ext_resource path="res://ball.tscn" type="PackedScene" id=2]
+[ext_resource path="res://grass_24.bmp" type="Texture" id=3]
+[ext_resource path="res://game.gd" type="Script" id=4]
-[sub_resource type="CubeMesh" id=1]
-size = Vector3( 25, 1, 100 )
+[sub_resource type="CubeMesh" id=16]
+size = Vector3( 45, 2, 300 )
+
+[sub_resource type="ConcavePolygonShape" id=18]
+data = PoolVector3Array( -22.5, 1, 150, 22.5, 1, 150, -22.5, -1, 150, 22.5, 1, 150, 22.5, -1, 150, -22.5, -1, 150, 22.5, 1, -150, -22.5, 1, -150, 22.5, -1, -150, -22.5, 1, -150, -22.5, -1, -150, 22.5, -1, -150, 22.5, 1, 150, 22.5, 1, -150, 22.5, -1, 150, 22.5, 1, -150, 22.5, -1, -150, 22.5, -1, 150, -22.5, 1, -150, -22.5, 1, 150, -22.5, -1, -150, -22.5, 1, 150, -22.5, -1, 150, -22.5, -1, -150, 22.5, 1, 150, -22.5, 1, 150, 22.5, 1, -150, -22.5, 1, 150, -22.5, 1, -150, 22.5, 1, -150, -22.5, -1, 150, 22.5, -1, 150, -22.5, -1, -150, 22.5, -1, 150, 22.5, -1, -150, -22.5, -1, -150 )
+
+[sub_resource type="SpatialMaterial" id=23]
+flags_transparent = true
+
+[sub_resource type="CubeMesh" id=22]
+material = SubResource( 23 )
+size = Vector3( 2, 200, 300 )
-[sub_resource type="ConcavePolygonShape" id=2]
-data = PoolVector3Array( -12.5, 0.5, 25, 12.5, 0.5, 25, -12.5, -0.5, 25, 12.5, 0.5, 25, 12.5, -0.5, 25, -12.5, -0.5, 25, 12.5, 0.5, -25, -12.5, 0.5, -25, 12.5, -0.5, -25, -12.5, 0.5, -25, -12.5, -0.5, -25, 12.5, -0.5, -25, 12.5, 0.5, 25, 12.5, 0.5, -25, 12.5, -0.5, 25, 12.5, 0.5, -25, 12.5, -0.5, -25, 12.5, -0.5, 25, -12.5, 0.5, -25, -12.5, 0.5, 25, -12.5, -0.5, -25, -12.5, 0.5, 25, -12.5, -0.5, 25, -12.5, -0.5, -25, 12.5, 0.5, 25, -12.5, 0.5, 25, 12.5, 0.5, -25, -12.5, 0.5, 25, -12.5, 0.5, -25, 12.5, 0.5, -25, -12.5, -0.5, 25, 12.5, -0.5, 25, -12.5, -0.5, -25, 12.5, -0.5, 25, 12.5, -0.5, -25, -12.5, -0.5, -25 )
+[sub_resource type="ConcavePolygonShape" id=24]
+data = PoolVector3Array( -1, 100, 150, 1, 100, 150, -1, -100, 150, 1, 100, 150, 1, -100, 150, -1, -100, 150, 1, 100, -150, -1, 100, -150, 1, -100, -150, -1, 100, -150, -1, -100, -150, 1, -100, -150, 1, 100, 150, 1, 100, -150, 1, -100, 150, 1, 100, -150, 1, -100, -150, 1, -100, 150, -1, 100, -150, -1, 100, 150, -1, -100, -150, -1, 100, 150, -1, -100, 150, -1, -100, -150, 1, 100, 150, -1, 100, 150, 1, 100, -150, -1, 100, 150, -1, 100, -150, 1, 100, -150, -1, -100, 150, 1, -100, 150, -1, -100, -150, 1, -100, 150, 1, -100, -150, -1, -100, -150 )
-[sub_resource type="ConcavePolygonShape" id=3]
-data = PoolVector3Array( -12.5, 0.5, 50, 12.5, 0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, -50, 12.5, -0.5, -50, -12.5, 0.5, -50, -12.5, -0.5, -50, 12.5, -0.5, -50, 12.5, 0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, -50, 12.5, -0.5, 50, -12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, 0.5, 50, -12.5, 0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, 0.5, -50, 12.5, 0.5, -50, -12.5, -0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, -0.5, 50, 12.5, -0.5, -50, -12.5, -0.5, -50 )
+[sub_resource type="CubeMesh" id=14]
+size = Vector3( 45, 2, 300 )
+
+[sub_resource type="ConcavePolygonShape" id=19]
+data = PoolVector3Array( -22.5, 1, 150, 22.5, 1, 150, -22.5, -1, 150, 22.5, 1, 150, 22.5, -1, 150, -22.5, -1, 150, 22.5, 1, -150, -22.5, 1, -150, 22.5, -1, -150, -22.5, 1, -150, -22.5, -1, -150, 22.5, -1, -150, 22.5, 1, 150, 22.5, 1, -150, 22.5, -1, 150, 22.5, 1, -150, 22.5, -1, -150, 22.5, -1, 150, -22.5, 1, -150, -22.5, 1, 150, -22.5, -1, -150, -22.5, 1, 150, -22.5, -1, 150, -22.5, -1, -150, 22.5, 1, 150, -22.5, 1, 150, 22.5, 1, -150, -22.5, 1, 150, -22.5, 1, -150, 22.5, 1, -150, -22.5, -1, 150, 22.5, -1, 150, -22.5, -1, -150, 22.5, -1, 150, 22.5, -1, -150, -22.5, -1, -150 )
+
+[sub_resource type="CubeMesh" id=1]
+size = Vector3( 45, 1, 200 )
-[sub_resource type="ConcavePolygonShape" id=4]
-data = PoolVector3Array( -12.5, 0.5, 50, 12.5, 0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, -50, 12.5, -0.5, -50, -12.5, 0.5, -50, -12.5, -0.5, -50, 12.5, -0.5, -50, 12.5, 0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, -50, 12.5, -0.5, 50, -12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, 0.5, 50, -12.5, 0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, 0.5, -50, 12.5, 0.5, -50, -12.5, -0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, -0.5, 50, 12.5, -0.5, -50, -12.5, -0.5, -50 )
+[sub_resource type="ConcavePolygonShape" id=20]
+data = PoolVector3Array( -22.5, 0.5, 100, 22.5, 0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, -100, 22.5, -0.5, -100, -22.5, 0.5, -100, -22.5, -0.5, -100, 22.5, -0.5, -100, 22.5, 0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, -100, 22.5, -0.5, 100, -22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, 0.5, 100, -22.5, 0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, 0.5, -100, 22.5, 0.5, -100, -22.5, -0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, -0.5, 100, 22.5, -0.5, -100, -22.5, -0.5, -100 )
-[sub_resource type="ConcavePolygonShape" id=5]
-data = PoolVector3Array( -12.5, 0.5, 50, 12.5, 0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, -50, 12.5, -0.5, -50, -12.5, 0.5, -50, -12.5, -0.5, -50, 12.5, -0.5, -50, 12.5, 0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, -50, 12.5, -0.5, 50, -12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, 0.5, 50, -12.5, 0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, 0.5, -50, 12.5, 0.5, -50, -12.5, -0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, -0.5, 50, 12.5, -0.5, -50, -12.5, -0.5, -50 )
+[sub_resource type="ConcavePolygonShape" id=21]
+data = PoolVector3Array( -22.5, 0.5, 100, 22.5, 0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, -100, 22.5, -0.5, -100, -22.5, 0.5, -100, -22.5, -0.5, -100, 22.5, -0.5, -100, 22.5, 0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, -100, 22.5, -0.5, 100, -22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, 0.5, 100, -22.5, 0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, 0.5, -100, 22.5, 0.5, -100, -22.5, -0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, -0.5, 100, 22.5, -0.5, -100, -22.5, -0.5, -100 )
-[sub_resource type="SpatialMaterial" id=6]
-albedo_color = Color( 0.298039, 0.235294, 0.235294, 1 )
+[sub_resource type="SpatialMaterial" id=13]
+albedo_texture = ExtResource( 3 )
[sub_resource type="CubeMesh" id=7]
-material = SubResource( 6 )
-size = Vector3( 100, 1, 100 )
+material = SubResource( 13 )
+size = Vector3( 200, 1, 300 )
-[sub_resource type="ConcavePolygonShape" id=8]
-data = PoolVector3Array( -50, 0.5, 50, 50, 0.5, 50, -50, -0.5, 50, 50, 0.5, 50, 50, -0.5, 50, -50, -0.5, 50, 50, 0.5, -50, -50, 0.5, -50, 50, -0.5, -50, -50, 0.5, -50, -50, -0.5, -50, 50, -0.5, -50, 50, 0.5, 50, 50, 0.5, -50, 50, -0.5, 50, 50, 0.5, -50, 50, -0.5, -50, 50, -0.5, 50, -50, 0.5, -50, -50, 0.5, 50, -50, -0.5, -50, -50, 0.5, 50, -50, -0.5, 50, -50, -0.5, -50, 50, 0.5, 50, -50, 0.5, 50, 50, 0.5, -50, -50, 0.5, 50, -50, 0.5, -50, 50, 0.5, -50, -50, -0.5, 50, 50, -0.5, 50, -50, -0.5, -50, 50, -0.5, 50, 50, -0.5, -50, -50, -0.5, -50 )
+[sub_resource type="ConcavePolygonShape" id=17]
+data = PoolVector3Array( -100, 0.5, 150, 100, 0.5, 150, -100, -0.5, 150, 100, 0.5, 150, 100, -0.5, 150, -100, -0.5, 150, 100, 0.5, -150, -100, 0.5, -150, 100, -0.5, -150, -100, 0.5, -150, -100, -0.5, -150, 100, -0.5, -150, 100, 0.5, 150, 100, 0.5, -150, 100, -0.5, 150, 100, 0.5, -150, 100, -0.5, -150, 100, -0.5, 150, -100, 0.5, -150, -100, 0.5, 150, -100, -0.5, -150, -100, 0.5, 150, -100, -0.5, 150, -100, -0.5, -150, 100, 0.5, 150, -100, 0.5, 150, 100, 0.5, -150, -100, 0.5, 150, -100, 0.5, -150, 100, 0.5, -150, -100, -0.5, 150, 100, -0.5, 150, -100, -0.5, -150, 100, -0.5, 150, 100, -0.5, -150, -100, -0.5, -150 )
[node name="game" type="Spatial"]
+script = ExtResource( 4 )
[node name="MeshInstance" type="MeshInstance" parent="."]
-transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 50.3668, 11.7884, -0.881386 )
-mesh = SubResource( 1 )
+transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 100, 23, 0 )
+mesh = SubResource( 16 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="MeshInstance"]
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance/StaticBody"]
-shape = SubResource( 2 )
+shape = SubResource( 18 )
+
+[node name="MeshInstance5" type="MeshInstance" parent="."]
+transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 0, 45, 0 )
+mesh = SubResource( 22 )
+material/0 = null
+
+[node name="StaticBody" type="StaticBody" parent="MeshInstance5"]
+
+[node name="CollisionShape" type="CollisionShape" parent="MeshInstance5/StaticBody"]
+shape = SubResource( 24 )
[node name="MeshInstance4" type="MeshInstance" parent="."]
-transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, -49.5117, 12, -1 )
-mesh = SubResource( 1 )
+transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, -100, 23, -1 )
+mesh = SubResource( 14 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="MeshInstance4"]
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance4/StaticBody"]
-shape = SubResource( 3 )
+shape = SubResource( 19 )
[node name="MeshInstance2" type="MeshInstance" parent="."]
-transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0.488319, 12, -50.4671 )
+transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0, 23, -150 )
mesh = SubResource( 1 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="MeshInstance2"]
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance2/StaticBody"]
-shape = SubResource( 4 )
+shape = SubResource( 20 )
[node name="MeshInstance3" type="MeshInstance" parent="."]
-transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0.488319, 12, 49 )
+transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0, 23, 150 )
mesh = SubResource( 1 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="MeshInstance3"]
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance3/StaticBody"]
-shape = SubResource( 5 )
+shape = SubResource( 21 )
[node name="ground" type="MeshInstance" parent="."]
mesh = SubResource( 7 )
@@ -77,9 +106,15 @@ material/0 = null
[node name="StaticBody" type="StaticBody" parent="ground"]
[node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody"]
-shape = SubResource( 8 )
+shape = SubResource( 17 )
[node name="car" parent="." instance=ExtResource( 1 )]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.00634, -4 )
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4 )
+continuous_cd = true
[node name="ball" parent="." instance=ExtResource( 2 )]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.05547, 6.1003 )
+
+[node name="DirectionalLight" type="DirectionalLight" parent="."]
+transform = Transform( 1, 0, 0, 0, -0.534087, 0.84543, 0, -0.84543, -0.534087, -45.9835, 32.3876, 38.4155 )
+shadow_enabled = true