Add improved buggy

soundtrack
Ensar Sarajčić 2021-11-06 23:08:55 +01:00
parent eda656d33d
commit 5915155cd8
9 changed files with 76 additions and 65 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -20,6 +20,7 @@ nodes/use_legacy_names=false
materials/location=1
materials/storage=1
materials/keep_on_reimport=true
meshes/octahedral_compression=true
meshes/compress=true
meshes/ensure_tangents=true
meshes/storage=0

View File

@ -5,3 +5,4 @@
[resource]
background_mode = 2
background_sky = SubResource( 1 )
dof_blur_far_distance = 136.42

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://vehicles/buggy.tscn" type="PackedScene" id=1]
[ext_resource path="res://player/camera.gd" type="Script" id=2]
@ -6,10 +6,10 @@
[sub_resource type="PlaneMesh" id=1]
[sub_resource type="SpatialMaterial" id=3]
[sub_resource type="SpatialMaterial" id=2]
albedo_texture = ExtResource( 3 )
[sub_resource type="ConcavePolygonShape" id=2]
[sub_resource type="ConcavePolygonShape" id=3]
data = PoolVector3Array( 1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0, -1, 1, 0, -1 )
[sub_resource type="Curve3D" id=4]
@ -18,48 +18,24 @@ _data = {
"tilts": PoolRealArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
}
[sub_resource type="Shader" id=5]
code = "shader_type spatial;
uniform sampler2D road_texture;
void fragment() {
vec2 road_uv = vec2(UV.y, UV.x);
vec4 color = texture(road_texture, road_uv);
ALBEDO = color.rgb;
METALLIC = 0.0;
ROUGHNESS = 0.8;
}"
[sub_resource type="OpenSimplexNoise" id=7]
period = 0.1
[sub_resource type="NoiseTexture" id=8]
seamless = true
noise = SubResource( 7 )
[sub_resource type="ShaderMaterial" id=6]
shader = SubResource( 5 )
shader_param/road_texture = SubResource( 8 )
[node name="Spatial" type="Spatial"]
[node name="StaticBody" type="StaticBody" parent="."]
transform = Transform( 99.9785, 0, 0, 0, 99.9785, 0, 0, 0, 99.9785, 0, 0, 0 )
visible = false
[node name="MeshInstance" type="MeshInstance" parent="StaticBody"]
transform = Transform( 6.13726, 0, 0, 0, 6.13726, 0, 0, 0, 6.13726, 0, 0, 0 )
mesh = SubResource( 1 )
material/0 = SubResource( 3 )
material/0 = SubResource( 2 )
[node name="CollisionShape" type="CollisionShape" parent="StaticBody"]
transform = Transform( 6.13726, 0, 0, 0, 6.13726, 0, 0, 0, 6.13726, 0, 0, 0 )
shape = SubResource( 2 )
shape = SubResource( 3 )
[node name="buggy" parent="." instance=ExtResource( 1 )]
transform = Transform( 1.00456, 0, 0, 0, 1.00456, 0, 0, 0, 1.00456, -38.0965, 0.0478153, -0.0235357 )
transform = Transform( 1.00456, 0, 0, 0, 1.00456, 0, 0, 0, 1.00456, -38.0928, 1.38435, -0.0872202 )
mass = 250.0
engine_force_value = 10000
[node name="camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.88022, 23.0639 )
@ -74,14 +50,31 @@ target_height = 6.0
curve = SubResource( 4 )
[node name="Road" type="CSGPolygon" parent="Track/Path"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.194962, 0.557852, -0.0180283 )
use_collision = true
invert_faces = true
polygon = PoolVector2Array( -8, 0, -3, 0.1, 8, 0.1, 2, 0 )
polygon = PoolVector2Array( -8, 0, 2, 0.1, 8, 0.1, 2, 0 )
mode = 2
path_node = NodePath("..")
path_interval_type = 0
path_interval = 1.0
path_simplify_angle = 0.0
path_rotation = 2
path_local = false
path_continuous_u = false
path_u_distance = 1.0
path_joined = false
[node name="Slope" type="CSGPolygon" parent="Track/Path"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.131294, 0.632256, -0.0876541 )
use_collision = true
polygon = PoolVector2Array( -12, -10, -10, -0.1, -3, 0, 3, 0, 10, -0.1, 12, -15 )
mode = 2
path_node = NodePath("..")
path_interval_type = 0
path_interval = 1.0
path_simplify_angle = 1.3
path_rotation = 2
path_local = true
path_continuous_u = true
path_u_distance = 1.0
path_joined = false
material = SubResource( 6 )

View File

@ -4,52 +4,44 @@
[ext_resource path="res://vehicles/buggy.gd" type="Script" id=3]
[sub_resource type="BoxShape" id=1]
extents = Vector3( 2.48318, 1, 1.55313 )
extents = Vector3( 0.521885, 0.334919, 1.78849 )
[node name="buggy" instance=ExtResource( 1 )]
script = ExtResource( 3 )
[node name="left_front" parent="." index="2"]
[node name="chassis" parent="." index="0"]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0.446435, 0 )
[node name="front_left" parent="." index="1"]
use_as_traction = true
use_as_steering = true
wheel_roll_influence = 0.2
wheel_radius = 1.0
wheel_rest_length = 1.0
wheel_radius = 0.6
wheel_rest_length = 0.4
suspension_travel = 1.0
suspension_stiffness = 3.0
suspension_max_force = 10000.0
[node name="right_front" parent="." index="3"]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 2.327, 0.964, -2.94 )
use_as_traction = true
use_as_steering = true
wheel_roll_influence = 0.2
wheel_radius = 1.0
wheel_rest_length = 1.0
suspension_travel = 1.0
suspension_stiffness = 3.0
suspension_max_force = 10000.0
[node name="CollisionShape" type="CollisionShape" parent="." index="2"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.23227, 0 )
shape = SubResource( 1 )
[node name="rear_left" parent="." index="4"]
use_as_traction = true
wheel_roll_influence = 0.2
wheel_radius = 1.0
wheel_rest_length = 1.0
wheel_friction_slip = 4.0
wheel_radius = 0.6
wheel_rest_length = 0.4
suspension_travel = 1.0
suspension_stiffness = 3.0
suspension_max_force = 10000.0
[node name="rear_right" parent="." index="5"]
[node name="front_right" parent="." index="5"]
use_as_traction = true
wheel_roll_influence = 0.2
wheel_radius = 1.0
wheel_rest_length = 1.0
wheel_friction_slip = 4.0
use_as_steering = true
wheel_radius = 0.6
wheel_rest_length = 0.4
suspension_travel = 1.0
suspension_stiffness = 3.0
suspension_max_force = 10000.0
[node name="CollisionShape" type="CollisionShape" parent="." index="6"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.99308, 0 )
shape = SubResource( 1 )
[node name="rear_right" parent="." index="6"]
use_as_traction = true
wheel_radius = 0.6
wheel_rest_length = 0.4
suspension_travel = 1.0
suspension_max_force = 10000.0

View File

@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://vehicles/buggy.tscn" type="PackedScene" id=1]
[sub_resource type="CubeMesh" id=1]
[sub_resource type="ConcavePolygonShape" id=2]
data = PoolVector3Array( -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1 )
[node name="buggy" instance=ExtResource( 1 )]
[node name="Camera" type="Camera" parent="." index="7"]
transform = Transform( -0.0903024, 0, -0.995914, 0, 1, 0, 0.995914, 0, -0.0903024, -3.4904, 1.22508, 0 )
[node name="StaticBody" type="StaticBody" parent="." index="8"]
[node name="MeshInstance" type="MeshInstance" parent="StaticBody" index="0"]
transform = Transform( 6.60148, 0, 0, 0, 0.0658818, 0, 0, 0, 6.60148, 0, -0.212286, 0 )
mesh = SubResource( 1 )
material/0 = null
[node name="CollisionShape" type="CollisionShape" parent="StaticBody" index="1"]
transform = Transform( 6.60148, 0, 0, 0, 0.0658818, 0, 0, 0, 6.60148, 0, -0.212286, 0 )
shape = SubResource( 2 )