generated from krampus/template-godot4
Added terrain test map
This commit is contained in:
parent
d0b4506d80
commit
2f4801dbaa
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.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,22 @@
|
|||
extends Node3D
|
||||
|
||||
const BALL_SPAWN_GROUP := "BallSpawn"
|
||||
|
||||
@export var ball_scene: PackedScene
|
||||
|
||||
|
||||
func spawn_balls() -> void:
|
||||
for spawn: Node3D in get_tree().get_nodes_in_group(BALL_SPAWN_GROUP):
|
||||
var ball: GameBall = ball_scene.instantiate()
|
||||
var callback := func() -> void:
|
||||
if ball.sleeping:
|
||||
ball.queue_free()
|
||||
ball.sleeping_state_changed.connect(callback)
|
||||
spawn.add_sibling(ball)
|
||||
ball.global_transform = spawn.global_transform
|
||||
ball.freeze = false
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Input.is_action_just_pressed("debug_1"):
|
||||
spawn_balls()
|
|
@ -0,0 +1,519 @@
|
|||
[gd_scene load_steps=37 format=3 uid="uid://cvs546kk7t7aw"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c47ern0l2d50r" path="res://assets/vista_2.png" id="1_d1wmn"]
|
||||
[ext_resource type="Script" path="res://levels/terrain_test/terrain_test.gd" id="1_drk48"]
|
||||
[ext_resource type="Terrain3DAssets" uid="uid://cwl34gstabgrx" path="res://levels/debug_level/terrain_assets.res" id="2_25igk"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7pgvftmj7nbe" path="res://src/equipment/balls/debug_ball/debug_ball.tscn" id="2_77pf6"]
|
||||
[ext_resource type="Texture2D" path="res://assets/textures/grass_rough/grass_rough_albedo.dds" id="4_rm170"]
|
||||
[ext_resource type="FontFile" uid="uid://cbaqlaqdobnux" path="res://assets/fonts/Orbitron/Orbitron-VariableFont_wght.ttf" id="5_h18yf"]
|
||||
[ext_resource type="Script" path="res://src/world/terrain_marker.gd" id="6_4bo0x"]
|
||||
[ext_resource type="Texture2D" path="res://assets/textures/grass_fairway/grass_fairway_albedo.dds" id="6_wdukl"]
|
||||
[ext_resource type="Texture2D" path="res://assets/textures/grass_green/grass_green_albedo.dds" id="8_gxslv"]
|
||||
[ext_resource type="Texture2D" path="res://assets/textures/sand_trap/sand_trap_albedo.dds" id="9_ris7y"]
|
||||
[ext_resource type="Texture2D" uid="uid://cqlp0tjmadi75" path="res://assets/textures/highway/highway_road.png" id="10_4nt4g"]
|
||||
[ext_resource type="Texture2D" path="res://assets/textures/mountain_rock/mountain_rock_albedo.dds" id="11_2lq7o"]
|
||||
[ext_resource type="Texture2D" uid="uid://bq8dxuxfw1rwu" path="res://assets/textures/wood/lacquered_planks.png" id="12_e07mg"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8vgf8wy7h4nx" path="res://assets/textures/guard_rail/guard_rail.png" id="13_ll3kp"]
|
||||
[ext_resource type="Material" uid="uid://c5hidbq5gbmr" path="res://assets/materials/crystal.tres" id="14_o81al"]
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_kd0nc"]
|
||||
panorama = ExtResource("1_d1wmn")
|
||||
|
||||
[sub_resource type="Sky" id="Sky_3yoab"]
|
||||
sky_material = SubResource("PanoramaSkyMaterial_kd0nc")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_qax3v"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_3yoab")
|
||||
ambient_light_source = 2
|
||||
ambient_light_color = Color(0.78, 0.78, 0.78, 1)
|
||||
ssao_enabled = true
|
||||
ssao_intensity = 1.7
|
||||
glow_enabled = true
|
||||
glow_bloom = 0.05
|
||||
volumetric_fog_enabled = true
|
||||
volumetric_fog_density = 0.001
|
||||
volumetric_fog_emission = Color(0.6, 1, 1, 1)
|
||||
volumetric_fog_length = 1024.0
|
||||
volumetric_fog_sky_affect = 0.0
|
||||
|
||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_ph8qj"]
|
||||
dof_blur_far_distance = 200.0
|
||||
dof_blur_far_transition = 800.0
|
||||
dof_blur_near_enabled = true
|
||||
dof_blur_near_distance = 1.0
|
||||
dof_blur_near_transition = 0.5
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rpgb7"]
|
||||
noise_type = 0
|
||||
frequency = 1.0
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_sb318"]
|
||||
width = 256
|
||||
height = 256
|
||||
seamless = true
|
||||
noise = SubResource("FastNoiseLite_rpgb7")
|
||||
|
||||
[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_4xim8"]
|
||||
_shader_parameters = {
|
||||
"auto_base_texture": 4,
|
||||
"auto_height_reduction": 0.1,
|
||||
"auto_overlay_texture": 0,
|
||||
"auto_slope": 0.41,
|
||||
"blend_sharpness": 1.0,
|
||||
"height_blending": true,
|
||||
"macro_variation1": Color(0.964742, 0.964742, 0.964742, 1),
|
||||
"macro_variation2": Color(1, 1, 1, 1),
|
||||
"noise1_angle": 0.0,
|
||||
"noise1_offset": Vector2(0.5, 0.5),
|
||||
"noise1_scale": 0.062,
|
||||
"noise2_scale": 0.076,
|
||||
"noise3_scale": 0.021,
|
||||
"noise_texture": SubResource("NoiseTexture2D_sb318"),
|
||||
"vertex_normals_distance": 128.0,
|
||||
"world_noise_height": 74.0,
|
||||
"world_noise_lod_distance": 7500.0,
|
||||
"world_noise_max_octaves": 8,
|
||||
"world_noise_min_octaves": 2,
|
||||
"world_noise_offset": Vector3(0, -8, 0),
|
||||
"world_noise_region_blend": 0.55,
|
||||
"world_noise_scale": 5.0
|
||||
}
|
||||
world_background = 2
|
||||
texture_filtering = 1
|
||||
auto_shader = true
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_7awoq"]
|
||||
size = Vector3(10, 1, 60)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ceq7g"]
|
||||
albedo_texture = ExtResource("4_rm170")
|
||||
|
||||
[sub_resource type="PrismMesh" id="PrismMesh_kdeya"]
|
||||
left_to_right = 1.0
|
||||
size = Vector3(100, 50, 10)
|
||||
|
||||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ufirn"]
|
||||
data = PackedVector3Array(-5, 0.5, 30, 5, 0.5, 30, -5, -0.5, 30, 5, 0.5, 30, 5, -0.5, 30, -5, -0.5, 30, 5, 0.5, -30, -5, 0.5, -30, 5, -0.5, -30, -5, 0.5, -30, -5, -0.5, -30, 5, -0.5, -30, 5, 0.5, 30, 5, 0.5, -30, 5, -0.5, 30, 5, 0.5, -30, 5, -0.5, -30, 5, -0.5, 30, -5, 0.5, -30, -5, 0.5, 30, -5, -0.5, -30, -5, 0.5, 30, -5, -0.5, 30, -5, -0.5, -30, 5, 0.5, 30, -5, 0.5, 30, 5, 0.5, -30, -5, 0.5, 30, -5, 0.5, -30, 5, 0.5, -30, -5, -0.5, 30, 5, -0.5, 30, -5, -0.5, -30, 5, -0.5, 30, 5, -0.5, -30, -5, -0.5, -30)
|
||||
|
||||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_gq475"]
|
||||
data = PackedVector3Array(50, 25, 5, 50, -25, 5, -50, -25, 5, 50, 25, -5, -50, -25, -5, 50, -25, -5, 50, 25, 5, 50, 25, -5, 50, -25, 5, 50, 25, -5, 50, -25, -5, 50, -25, 5, 50, 25, -5, 50, 25, 5, -50, -25, -5, 50, 25, 5, -50, -25, 5, -50, -25, -5, -50, -25, 5, 50, -25, 5, -50, -25, -5, 50, -25, 5, 50, -25, -5, -50, -25, -5)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_oukkf"]
|
||||
size = Vector3(10, 1, 60)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c7541"]
|
||||
albedo_texture = ExtResource("6_wdukl")
|
||||
|
||||
[sub_resource type="PrismMesh" id="PrismMesh_c7rfr"]
|
||||
left_to_right = 1.0
|
||||
size = Vector3(100, 50, 10)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_18mqp"]
|
||||
albedo_texture = ExtResource("8_gxslv")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2lnp3"]
|
||||
albedo_texture = ExtResource("9_ris7y")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nflf8"]
|
||||
albedo_texture = ExtResource("10_4nt4g")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3qcr7"]
|
||||
albedo_texture = ExtResource("11_2lq7o")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5nlxd"]
|
||||
albedo_texture = ExtResource("12_e07mg")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fhrit"]
|
||||
albedo_texture = ExtResource("13_ll3kp")
|
||||
|
||||
[node name="TerrainTestMap" type="Node3D"]
|
||||
script = ExtResource("1_drk48")
|
||||
ball_scene = ExtResource("2_77pf6")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_qax3v")
|
||||
camera_attributes = SubResource("CameraAttributesPractical_ph8qj")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.782608, -0.611691, 0.11558, 0, 0.185667, 0.982613, -0.622515, -0.769001, 0.145304, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
shadow_blur = 4.0
|
||||
directional_shadow_split_1 = 0.017
|
||||
directional_shadow_split_2 = 0.042
|
||||
directional_shadow_split_3 = 0.247
|
||||
directional_shadow_fade_start = 0.98
|
||||
directional_shadow_max_distance = 750.0
|
||||
directional_shadow_pancake_size = 5.0
|
||||
|
||||
[node name="Terrain3D" type="Terrain3D" parent="."]
|
||||
data_directory = "res://levels/terrain_test/terrain_3d_data"
|
||||
material = SubResource("Terrain3DMaterial_4xim8")
|
||||
assets = ExtResource("2_25igk")
|
||||
mesh_size = 64
|
||||
top_level = true
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="PlayerSpawn" type="Marker3D" parent="." groups=["PlayerSpawn"]]
|
||||
|
||||
[node name="TestRamps" type="Node3D" parent="."]
|
||||
|
||||
[node name="Rough" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Rough"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Rough/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_7awoq")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_ceq7g")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Rough/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_kdeya")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_ceq7g")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Rough/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Rough"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="TestRamps/Rough/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Rough/RampGeometry/StaticBody3D"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 1
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Rough/RampGeometry/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Rough/RampGeometry/StaticBody3D"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Rough/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Fairway" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.34202, 0, 0.939693, 0, 1, 0, -0.939693, 0, 0.34202, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Fairway"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Fairway/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_c7541")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Fairway/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_c7541")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Fairway/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Fairway"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Fairway/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Fairway/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 2
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Fairway/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Fairway/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Fairway/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Green" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.642788, 0, 0.766044, 0, 1, 0, -0.766044, 0, 0.642788, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Green"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Green/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_18mqp")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Green/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_18mqp")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Green/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Green"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Green/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Green/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 3
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Green/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Green/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Green/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Sand" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.866025, 0, 0.5, 0, 1, 0, -0.5, 0, 0.866025, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Sand"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Sand/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_2lnp3")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Sand/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_2lnp3")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Sand/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Sand"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Sand/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Sand/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Sand/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Sand/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Sand/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Concrete" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.984808, 0, 0.173648, 0, 1, 0, -0.173648, 0, 0.984808, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Concrete"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Concrete/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_nflf8")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Concrete/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_nflf8")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Concrete/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Concrete"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Concrete/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Concrete/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 5
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Concrete/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Concrete/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Concrete/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Rock" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.984808, 0, -0.173648, 0, 1, 0, 0.173648, 0, 0.984808, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Rock"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Rock/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_3qcr7")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Rock/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_3qcr7")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Rock/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Rock"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Rock/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Rock/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 6
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Rock/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Rock/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Rock/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Wood" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.866025, 0, -0.5, 0, 1, 0, 0.5, 0, 0.866025, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Wood"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Wood/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_5nlxd")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Wood/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_5nlxd")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Wood/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Wood"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Wood/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Wood/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 7
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Wood/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Wood/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Wood/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Metal" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.642788, 0, -0.766044, 0, 1, 0, 0.766044, 0, 0.642788, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Metal"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Metal/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_fhrit")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Metal/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_fhrit")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Metal/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Metal"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Metal/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Metal/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 8
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Metal/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Metal/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Metal/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
||||
|
||||
[node name="Glass" type="Node3D" parent="TestRamps"]
|
||||
transform = Transform3D(0.34202, 0, -0.939692, 0, 1, 0, 0.939692, 0, 0.34202, 0, 0, 0)
|
||||
|
||||
[node name="RampGeometry" type="Node3D" parent="TestRamps/Glass"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Glass/RampGeometry"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
mesh = SubResource("BoxMesh_oukkf")
|
||||
surface_material_override/0 = ExtResource("14_o81al")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Glass/RampGeometry"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
|
||||
mesh = SubResource("PrismMesh_c7rfr")
|
||||
surface_material_override/0 = ExtResource("14_o81al")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="TestRamps/Glass/RampGeometry"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
|
||||
text = "Glass"
|
||||
font = ExtResource("5_h18yf")
|
||||
font_size = 300
|
||||
outline_size = 48
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="TestRamps/Glass/RampGeometry"]
|
||||
|
||||
[node name="TerrainMarker" type="Node" parent="TestRamps/Glass/RampGeometry/StaticBody3D2"]
|
||||
script = ExtResource("6_4bo0x")
|
||||
type = 9
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestRamps/Glass/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
|
||||
shape = SubResource("ConcavePolygonShape3D_ufirn")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="TestRamps/Glass/RampGeometry/StaticBody3D2"]
|
||||
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
|
||||
shape = SubResource("ConcavePolygonShape3D_gq475")
|
||||
|
||||
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Glass/RampGeometry" groups=["BallSpawn"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
|
|
@ -0,0 +1,20 @@
|
|||
extends GameBall
|
||||
|
||||
const INFO_FMT := "speed: {0} m/s\nlin.damp: {1}\nang.spd: {2}\nang.damp: {3}\ntime: {4} s\nsurface decay: {5}"
|
||||
|
||||
@onready var debug_info: Label3D = %DebugInfo
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
super._physics_process(delta)
|
||||
|
||||
debug_info.text = INFO_FMT.format(
|
||||
[
|
||||
linear_velocity.length(),
|
||||
linear_damp,
|
||||
angular_velocity.length(),
|
||||
angular_damp,
|
||||
_shot_time_s,
|
||||
terrain_physics.get_decay_factor(_surface_time_s)
|
||||
]
|
||||
)
|
|
@ -0,0 +1,43 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://b7pgvftmj7nbe"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dfttci386ohip" path="res://src/equipment/balls/physics_ball/physics_ball.tscn" id="1_gcsxs"]
|
||||
[ext_resource type="Script" path="res://src/equipment/balls/debug_ball/debug_ball.gd" id="2_edye5"]
|
||||
[ext_resource type="Texture2D" uid="uid://tancoet1lih5" path="res://assets/ui/ball_icons/basic_icon.png" id="2_h3ccx"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8pnwh"]
|
||||
transparency = 1
|
||||
no_depth_test = true
|
||||
shading_mode = 0
|
||||
albedo_texture = ExtResource("2_h3ccx")
|
||||
texture_filter = 2
|
||||
billboard_mode = 1
|
||||
fixed_size = true
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_lf5f4"]
|
||||
material = SubResource("StandardMaterial3D_8pnwh")
|
||||
size = Vector2(0.05, 0.05)
|
||||
|
||||
[sub_resource type="SystemFont" id="SystemFont_td87w"]
|
||||
font_names = PackedStringArray("Monospace")
|
||||
|
||||
[node name="DebugBall" instance=ExtResource("1_gcsxs")]
|
||||
script = ExtResource("2_edye5")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="BallMesh" index="0"]
|
||||
mesh = SubResource("QuadMesh_lf5f4")
|
||||
|
||||
[node name="DebugInfo" type="Label3D" parent="BallMesh" index="1"]
|
||||
unique_name_in_owner = true
|
||||
pixel_size = 0.0005
|
||||
offset = Vector2(0, -64)
|
||||
billboard = 1
|
||||
no_depth_test = true
|
||||
fixed_size = true
|
||||
texture_filter = 2
|
||||
text = "DEBUG INFO
|
||||
DEBUG INFO
|
||||
DEBUG INFO"
|
||||
font = SubResource("SystemFont_td87w")
|
||||
outline_size = 10
|
||||
horizontal_alignment = 0
|
||||
vertical_alignment = 0
|
|
@ -426,6 +426,7 @@ stream_0/stream = ExtResource("15_fn6g1")
|
|||
|
||||
[node name="ShotSetup" type="Node3D"]
|
||||
script = ExtResource("1_r6ei4")
|
||||
perfect_aim = true
|
||||
|
||||
[node name="BallPoint" type="Node3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
@ -1,32 +1,20 @@
|
|||
[gd_scene load_steps=24 format=3 uid="uid://cwnwcd8kushl3"]
|
||||
[gd_scene load_steps=22 format=3 uid="uid://cwnwcd8kushl3"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/world/world.gd" id="1_ybjyx"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvs546kk7t7aw" path="res://levels/terrain_test/terrain_test.tscn" id="2_6ivfd"]
|
||||
[ext_resource type="Script" path="res://src/player/world_player.gd" id="2_e743i"]
|
||||
[ext_resource type="Script" path="res://src/ui/world_ui.gd" id="2_imewa"]
|
||||
[ext_resource type="PackedScene" uid="uid://ciqd8r8yt00y0" path="res://levels/mall/mall.tscn" id="2_u4xvm"]
|
||||
[ext_resource type="Resource" uid="uid://crock3revdn73" path="res://src/player/debug_player.tres" id="3_pyw81"]
|
||||
[ext_resource type="Resource" uid="uid://c1pnqsddvey3m" path="res://src/equipment/clubs/drivers/debug_driver.tres" id="5_28hal"]
|
||||
[ext_resource type="Script" path="res://src/world/play_manager/round_robin_manager.gd" id="5_h6mje"]
|
||||
[ext_resource type="Script" path="res://src/world/play_manager/practice_manager.gd" id="5_yk526"]
|
||||
[ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="7_0gd42"]
|
||||
[ext_resource type="PackedScene" uid="uid://biokiug3e0ipk" path="res://src/ui/shot_hud/death_alert.tscn" id="8_fuyxc"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwyy7tt3nose1" path="res://src/ui/shot_hud/winner_alert.tscn" id="9_lln1k"]
|
||||
[ext_resource type="FontFile" uid="uid://dwy8k2w7vt64x" path="res://assets/fonts/classic-better-vcr/classic-better-vcr.otf" id="11_uv5b5"]
|
||||
[ext_resource type="Shader" path="res://src/shaders/vcr_distortion.gdshader" id="11_xag32"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_mbhdy"]
|
||||
script = ExtResource("2_e743i")
|
||||
life = 3.0
|
||||
name = "DeadGfolfer"
|
||||
color = Color(1, 0.439216, 0.439216, 1)
|
||||
driver = ExtResource("5_28hal")
|
||||
_balls = {
|
||||
1: -1,
|
||||
2: -1
|
||||
}
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rdjhi"]
|
||||
script = ExtResource("5_h6mje")
|
||||
players = Array[ExtResource("2_e743i")]([ExtResource("3_pyw81"), SubResource("Resource_mbhdy")])
|
||||
[sub_resource type="Resource" id="Resource_hpydy"]
|
||||
script = ExtResource("5_yk526")
|
||||
players = Array[ExtResource("2_e743i")]([ExtResource("3_pyw81")])
|
||||
|
||||
[sub_resource type="Animation" id="Animation_6350f"]
|
||||
length = 0.001
|
||||
|
@ -167,8 +155,8 @@ _data = {
|
|||
|
||||
[node name="World" type="Node" groups=["WorldGroup"]]
|
||||
script = ExtResource("1_ybjyx")
|
||||
initial_level = ExtResource("2_u4xvm")
|
||||
manager = SubResource("Resource_rdjhi")
|
||||
initial_level = ExtResource("2_6ivfd")
|
||||
manager = SubResource("Resource_hpydy")
|
||||
|
||||
[node name="Level" type="Node3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
|
Loading…
Reference in New Issue