Compare commits

...

4 Commits

20 changed files with 571 additions and 136 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=65 format=3 uid="uid://bm2o3mex10v11"] [gd_scene load_steps=66 format=3 uid="uid://bm2o3mex10v11"]
[ext_resource type="Terrain3DAssets" uid="uid://cwl34gstabgrx" path="res://levels/debug_level/terrain_assets.res" id="1_5smdk"] [ext_resource type="Terrain3DAssets" uid="uid://cwl34gstabgrx" path="res://levels/debug_level/terrain_assets.res" id="1_5smdk"]
[ext_resource type="Material" uid="uid://drxnue0xsen13" path="res://assets/materials/tropical_water.tres" id="4_bwkbv"] [ext_resource type="Material" uid="uid://drxnue0xsen13" path="res://assets/materials/tropical_water.tres" id="4_bwkbv"]
@ -20,6 +20,7 @@
[ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="16_2m5yu"] [ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="16_2m5yu"]
[ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="16_rat2n"] [ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="16_rat2n"]
[ext_resource type="PackedScene" uid="uid://nqar1qcun8ax" path="res://src/props/scenery/highway/guard_rail/guard_rail.tscn" id="16_xtxyj"] [ext_resource type="PackedScene" uid="uid://nqar1qcun8ax" path="res://src/props/scenery/highway/guard_rail/guard_rail.tscn" id="16_xtxyj"]
[ext_resource type="PackedScene" uid="uid://c6k44l0mnq3o1" path="res://src/world/effects/explosion/explosion_effect.tscn" id="16_xufks"]
[ext_resource type="PackedScene" uid="uid://d0tcr6uijpym5" path="res://src/props/scenery/highway/highway_road.tscn" id="17_amems"] [ext_resource type="PackedScene" uid="uid://d0tcr6uijpym5" path="res://src/props/scenery/highway/highway_road.tscn" id="17_amems"]
[ext_resource type="Texture2D" uid="uid://bq8dxuxfw1rwu" path="res://assets/textures/wood/lacquered_planks.png" id="17_xciuf"] [ext_resource type="Texture2D" uid="uid://bq8dxuxfw1rwu" path="res://assets/textures/wood/lacquered_planks.png" id="17_xciuf"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_green/grass_green_albedo.dds" id="18_scall"] [ext_resource type="Texture2D" path="res://assets/textures/grass_green/grass_green_albedo.dds" id="18_scall"]
@ -440,6 +441,10 @@ amount = -1
spawn_on_ready = true spawn_on_ready = true
spawn_turns = 1 spawn_turns = 1
[node name="ExplosionEffect" parent="Course" instance=ExtResource("16_xufks")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 274.103, 5.01502, 286.299)
visible = false
[node name="CityBuildings" type="Node3D" parent="."] [node name="CityBuildings" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4)

BIN
levels/debug_level/terrain_assets.res (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://cwxh04w02o83o"]
[ext_resource type="Texture2D" uid="uid://cqlp0tjmadi75" path="res://assets/textures/highway/highway_road.png" id="1_5ncmm"]
[resource]
albedo_texture = ExtResource("1_5ncmm")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://ccmj2vt17lvs2"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_fairway/grass_fairway_albedo.dds" id="1_isnyn"]
[resource]
albedo_texture = ExtResource("1_isnyn")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://cjvumpmthiac4"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_green/grass_green_albedo.dds" id="1_ad8tx"]
[resource]
albedo_texture = ExtResource("1_ad8tx")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://buagg4yv8c7lj"]
[ext_resource type="Texture2D" uid="uid://b8vgf8wy7h4nx" path="res://assets/textures/guard_rail/guard_rail.png" id="1_arb6a"]
[resource]
albedo_texture = ExtResource("1_arb6a")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://dei1jkva281ei"]
[ext_resource type="Texture2D" path="res://assets/textures/mountain_rock/mountain_rock_albedo.dds" id="1_x1eim"]
[resource]
albedo_texture = ExtResource("1_x1eim")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://c8uym7rba01o5"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_rough/grass_rough_albedo.dds" id="1_kiq74"]
[resource]
albedo_texture = ExtResource("1_kiq74")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://d3doxcg7g0sq"]
[ext_resource type="Texture2D" path="res://assets/textures/sand_trap/sand_trap_albedo.dds" id="1_bubcj"]
[resource]
albedo_texture = ExtResource("1_bubcj")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://bgnbvc5qdnoxm"]
[ext_resource type="Texture2D" uid="uid://bq8dxuxfw1rwu" path="res://assets/textures/wood/lacquered_planks.png" id="1_codln"]
[resource]
albedo_texture = ExtResource("1_codln")
uv1_scale = Vector3(0.05, 0.05, 0.05)
uv1_triplanar = true
texture_filter = 4

View File

@ -1,12 +1,16 @@
extends Node3D extends Node3D
const BALL_SPAWN_GROUP := "BallSpawn" const RAMP_SPAWN_GROUP := "RampSpawn"
const DROP_SPAWN_GROUP := "DropSpawn"
const PUTT_SPAWN_GROUP := "PuttSpawn"
const PUTT_VEC := Vector3(0, 0, 2)
@export var ball_scene: PackedScene @export var ball_scene: PackedScene
func spawn_balls() -> void: func spawn_balls(spawn_group: String, initial_impulse: Vector3 = Vector3.ZERO) -> void:
for spawn: Node3D in get_tree().get_nodes_in_group(BALL_SPAWN_GROUP): for spawn: Node3D in get_tree().get_nodes_in_group(spawn_group):
var ball: GameBall = ball_scene.instantiate() var ball: GameBall = ball_scene.instantiate()
var callback := func() -> void: var callback := func() -> void:
if ball.sleeping: if ball.sleeping:
@ -15,8 +19,23 @@ func spawn_balls() -> void:
spawn.add_sibling(ball) spawn.add_sibling(ball)
ball.global_transform = spawn.global_transform ball.global_transform = spawn.global_transform
ball.freeze = false ball.freeze = false
if initial_impulse:
ball.apply_impulse(
initial_impulse,
(
initial_impulse.normalized()
* -1
* ball.radius
* ball.radius
* ShotSetup.SHOT_OFFSET_Z_FACTOR
)
)
func _process(_delta: float) -> void: func _process(_delta: float) -> void:
if Input.is_action_just_pressed("debug_1"): if Input.is_action_just_pressed("debug_1"):
spawn_balls() spawn_balls(RAMP_SPAWN_GROUP)
if Input.is_action_just_pressed("debug_2"):
spawn_balls(DROP_SPAWN_GROUP)
if Input.is_action_just_pressed("debug_3"):
spawn_balls(PUTT_SPAWN_GROUP, PUTT_VEC)

View File

@ -1,20 +1,21 @@
[gd_scene load_steps=37 format=3 uid="uid://cvs546kk7t7aw"] [gd_scene load_steps=34 format=3 uid="uid://cvs546kk7t7aw"]
[ext_resource type="Texture2D" uid="uid://c47ern0l2d50r" path="res://assets/vista_2.png" id="1_d1wmn"] [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="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="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="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="Material" uid="uid://c8uym7rba01o5" path="res://levels/terrain_test/materials/rough.tres" id="5_5e0na"]
[ext_resource type="FontFile" uid="uid://cbaqlaqdobnux" path="res://assets/fonts/Orbitron/Orbitron-VariableFont_wght.ttf" id="5_h18yf"] [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="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="Material" uid="uid://ccmj2vt17lvs2" path="res://levels/terrain_test/materials/fairway.tres" id="8_eb66j"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_green/grass_green_albedo.dds" id="8_gxslv"] [ext_resource type="Material" uid="uid://cjvumpmthiac4" path="res://levels/terrain_test/materials/green.tres" id="9_b32yd"]
[ext_resource type="Texture2D" path="res://assets/textures/sand_trap/sand_trap_albedo.dds" id="9_ris7y"] [ext_resource type="Material" uid="uid://d3doxcg7g0sq" path="res://levels/terrain_test/materials/sand.tres" id="10_5p842"]
[ext_resource type="Texture2D" uid="uid://cqlp0tjmadi75" path="res://assets/textures/highway/highway_road.png" id="10_4nt4g"] [ext_resource type="Material" uid="uid://cwxh04w02o83o" path="res://levels/terrain_test/materials/concrete.tres" id="11_n8v11"]
[ext_resource type="Texture2D" path="res://assets/textures/mountain_rock/mountain_rock_albedo.dds" id="11_2lq7o"] [ext_resource type="Material" uid="uid://dei1jkva281ei" path="res://levels/terrain_test/materials/rock.tres" id="12_521n4"]
[ext_resource type="Texture2D" uid="uid://bq8dxuxfw1rwu" path="res://assets/textures/wood/lacquered_planks.png" id="12_e07mg"] [ext_resource type="Material" uid="uid://bgnbvc5qdnoxm" path="res://levels/terrain_test/materials/wood.tres" id="13_h001q"]
[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://buagg4yv8c7lj" path="res://levels/terrain_test/materials/metal.tres" id="14_7mq02"]
[ext_resource type="Material" uid="uid://c5hidbq5gbmr" path="res://assets/materials/crystal.tres" id="14_o81al"] [ext_resource type="Material" uid="uid://c5hidbq5gbmr" path="res://assets/materials/crystal.tres" id="14_o81al"]
[ext_resource type="PackedScene" uid="uid://1s3gywmoi20e" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.tscn" id="16_r3ld5"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_kd0nc"] [sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_kd0nc"]
panorama = ExtResource("1_d1wmn") panorama = ExtResource("1_d1wmn")
@ -86,9 +87,6 @@ auto_shader = true
[sub_resource type="BoxMesh" id="BoxMesh_7awoq"] [sub_resource type="BoxMesh" id="BoxMesh_7awoq"]
size = Vector3(10, 1, 60) size = Vector3(10, 1, 60)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ceq7g"]
albedo_texture = ExtResource("4_rm170")
[sub_resource type="PrismMesh" id="PrismMesh_kdeya"] [sub_resource type="PrismMesh" id="PrismMesh_kdeya"]
left_to_right = 1.0 left_to_right = 1.0
size = Vector3(100, 50, 10) size = Vector3(100, 50, 10)
@ -102,30 +100,20 @@ data = PackedVector3Array(50, 25, 5, 50, -25, 5, -50, -25, 5, 50, 25, -5, -50, -
[sub_resource type="BoxMesh" id="BoxMesh_oukkf"] [sub_resource type="BoxMesh" id="BoxMesh_oukkf"]
size = Vector3(10, 1, 60) size = Vector3(10, 1, 60)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c7541"]
albedo_texture = ExtResource("6_wdukl")
[sub_resource type="PrismMesh" id="PrismMesh_c7rfr"] [sub_resource type="PrismMesh" id="PrismMesh_c7rfr"]
left_to_right = 1.0 left_to_right = 1.0
size = Vector3(100, 50, 10) size = Vector3(100, 50, 10)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_18mqp"] [sub_resource type="BoxMesh" id="BoxMesh_3gfbh"]
albedo_texture = ExtResource("8_gxslv") size = Vector3(20, 1, 400)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2lnp3"] [sub_resource type="BoxShape3D" id="BoxShape3D_1sq7i"]
albedo_texture = ExtResource("9_ris7y") size = Vector3(20, 1, 400)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nflf8"] [sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_ugtgi"]
albedo_texture = ExtResource("10_4nt4g")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3qcr7"] [sub_resource type="BoxMesh" id="BoxMesh_u7piw"]
albedo_texture = ExtResource("11_2lq7o") size = Vector3(20, 1, 400)
[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"] [node name="TerrainTestMap" type="Node3D"]
script = ExtResource("1_drk48") script = ExtResource("1_drk48")
@ -157,6 +145,7 @@ metadata/_edit_lock_ = true
[node name="PlayerSpawn" type="Marker3D" parent="." groups=["PlayerSpawn"]] [node name="PlayerSpawn" type="Marker3D" parent="." groups=["PlayerSpawn"]]
[node name="TestRamps" type="Node3D" parent="."] [node name="TestRamps" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -299.216)
[node name="Rough" type="Node3D" parent="TestRamps"] [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) transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
@ -167,12 +156,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Rough/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Rough/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_7awoq") mesh = SubResource("BoxMesh_7awoq")
surface_material_override/0 = SubResource("StandardMaterial3D_ceq7g") surface_material_override/0 = ExtResource("5_5e0na")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Rough/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_kdeya") mesh = SubResource("PrismMesh_kdeya")
surface_material_override/0 = SubResource("StandardMaterial3D_ceq7g") surface_material_override/0 = ExtResource("5_5e0na")
[node name="Label3D" type="Label3D" parent="TestRamps/Rough/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -195,7 +184,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Rough/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Rough/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Fairway" type="Node3D" parent="TestRamps"] [node name="Fairway" type="Node3D" parent="TestRamps"]
@ -207,12 +196,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Fairway/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Fairway/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_c7541") surface_material_override/0 = ExtResource("8_eb66j")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Fairway/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_c7541") surface_material_override/0 = ExtResource("8_eb66j")
[node name="Label3D" type="Label3D" parent="TestRamps/Fairway/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -235,7 +224,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Fairway/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Fairway/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Green" type="Node3D" parent="TestRamps"] [node name="Green" type="Node3D" parent="TestRamps"]
@ -247,12 +236,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Green/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Green/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_18mqp") surface_material_override/0 = ExtResource("9_b32yd")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Green/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_18mqp") surface_material_override/0 = ExtResource("9_b32yd")
[node name="Label3D" type="Label3D" parent="TestRamps/Green/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -275,7 +264,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Green/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Green/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Sand" type="Node3D" parent="TestRamps"] [node name="Sand" type="Node3D" parent="TestRamps"]
@ -287,12 +276,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Sand/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Sand/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_2lnp3") surface_material_override/0 = ExtResource("10_5p842")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Sand/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_2lnp3") surface_material_override/0 = ExtResource("10_5p842")
[node name="Label3D" type="Label3D" parent="TestRamps/Sand/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -315,7 +304,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Sand/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Sand/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Concrete" type="Node3D" parent="TestRamps"] [node name="Concrete" type="Node3D" parent="TestRamps"]
@ -327,12 +316,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Concrete/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Concrete/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_nflf8") surface_material_override/0 = ExtResource("11_n8v11")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Concrete/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_nflf8") surface_material_override/0 = ExtResource("11_n8v11")
[node name="Label3D" type="Label3D" parent="TestRamps/Concrete/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -355,7 +344,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Concrete/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Concrete/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Rock" type="Node3D" parent="TestRamps"] [node name="Rock" type="Node3D" parent="TestRamps"]
@ -367,12 +356,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Rock/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Rock/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_3qcr7") surface_material_override/0 = ExtResource("12_521n4")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Rock/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_3qcr7") surface_material_override/0 = ExtResource("12_521n4")
[node name="Label3D" type="Label3D" parent="TestRamps/Rock/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -395,7 +384,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Rock/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Rock/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Wood" type="Node3D" parent="TestRamps"] [node name="Wood" type="Node3D" parent="TestRamps"]
@ -407,12 +396,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Wood/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Wood/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_5nlxd") surface_material_override/0 = ExtResource("13_h001q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Wood/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_5nlxd") surface_material_override/0 = ExtResource("13_h001q")
[node name="Label3D" type="Label3D" parent="TestRamps/Wood/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -435,7 +424,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Wood/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Wood/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Metal" type="Node3D" parent="TestRamps"] [node name="Metal" type="Node3D" parent="TestRamps"]
@ -447,12 +436,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Metal/RampGeometry"] [node name="MeshInstance3D" type="MeshInstance3D" parent="TestRamps/Metal/RampGeometry"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)
mesh = SubResource("BoxMesh_oukkf") mesh = SubResource("BoxMesh_oukkf")
surface_material_override/0 = SubResource("StandardMaterial3D_fhrit") surface_material_override/0 = ExtResource("14_7mq02")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="TestRamps/Metal/RampGeometry"] [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) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 25, 109)
mesh = SubResource("PrismMesh_c7rfr") mesh = SubResource("PrismMesh_c7rfr")
surface_material_override/0 = SubResource("StandardMaterial3D_fhrit") surface_material_override/0 = ExtResource("14_7mq02")
[node name="Label3D" type="Label3D" parent="TestRamps/Metal/RampGeometry"] [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) transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 8, 0)
@ -475,7 +464,7 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Metal/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Metal/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="Glass" type="Node3D" parent="TestRamps"] [node name="Glass" type="Node3D" parent="TestRamps"]
@ -515,5 +504,281 @@ shape = SubResource("ConcavePolygonShape3D_ufirn")
transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109) transform = Transform3D(-2.98023e-08, 0, -1, 0, 1, 0, 1, 0, -2.98023e-08, 0, 25, 109)
shape = SubResource("ConcavePolygonShape3D_gq475") shape = SubResource("ConcavePolygonShape3D_gq475")
[node name="BallSpawn" type="Marker3D" parent="TestRamps/Glass/RampGeometry" groups=["BallSpawn"]] [node name="BallSpawn" type="Marker3D" parent="TestRamps/Glass/RampGeometry" groups=["RampSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 158)
[node name="TestFields" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 30)
[node name="Rough" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Rough"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_3gfbh")
surface_material_override/0 = ExtResource("5_5e0na")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Rough/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Rough/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Rough/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 1
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Rough" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Rough" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Rough/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="GfolfGirl" parent="TestFields/Rough/PuttSpawn" instance=ExtResource("16_r3ld5")]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.5, -0.05, 0)
[node name="Fairway" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Fairway"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("8_eb66j")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Fairway/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Fairway/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Fairway/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 2
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Fairway" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Fairway" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Fairway/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 8)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Green" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 50, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Green"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("9_b32yd")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Green/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Green/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Green/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 3
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Green" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Green" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Green/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 13)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Sand" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 70, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Sand"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("10_5p842")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Sand/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Sand/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Sand/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 4
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Sand" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Sand" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Sand/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Concrete" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 90, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Concrete"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("11_n8v11")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Concrete/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Concrete/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Concrete/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 5
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Concrete" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Concrete" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Concrete/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 21)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Rock" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 110, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Rock"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("12_521n4")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Rock/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Rock/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Rock/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 6
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Rock" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Rock" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Rock/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 8)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Wood" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 130, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Wood"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("13_h001q")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Wood/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Wood/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Wood/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 7
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Wood" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Wood" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Wood/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 21)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Metal" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 150, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Metal"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("14_7mq02")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Metal/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Metal/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Metal/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 8
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Metal" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Metal" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Metal/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 21)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")
[node name="Glass" type="Node3D" parent="TestFields"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 170, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="TestFields/Glass"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
mesh = SubResource("BoxMesh_u7piw")
surface_material_override/0 = ExtResource("14_o81al")
[node name="StaticBody3D" type="StaticBody3D" parent="TestFields/Glass/MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -200)
[node name="CollisionShape3D" type="CollisionShape3D" parent="TestFields/Glass/MeshInstance3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 200)
shape = SubResource("BoxShape3D_1sq7i")
[node name="TerrainMarker" type="Node" parent="TestFields/Glass/MeshInstance3D/StaticBody3D"]
script = ExtResource("6_4bo0x")
type = 9
[node name="BallDropSpawn" type="Marker3D" parent="TestFields/Glass" groups=["DropSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 40, 10)
[node name="PuttSpawn" type="Marker3D" parent="TestFields/Glass" groups=["PuttSpawn"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 1)
[node name="GoalLine" type="Decal" parent="TestFields/Glass/PuttSpawn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 34)
size = Vector3(20, 2, 0.5)
texture_albedo = SubResource("PlaceholderTexture2D_ugtgi")

View File

@ -146,7 +146,6 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void:
min_dot = dot min_dot = dot
_last_contact_normal = norm _last_contact_normal = norm
primary_body = state.get_contact_collider_object(i) primary_body = state.get_contact_collider_object(i)
_surface_terrain = Terrain.from_collision(global_position, primary_body) _surface_terrain = Terrain.from_collision(global_position, primary_body)
else: else:
# Ball is in the air # Ball is in the air
@ -154,6 +153,7 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void:
_surface_time_s = 0.0 _surface_time_s = 0.0
var params := terrain_physics.get_params(_surface_terrain) var params := terrain_physics.get_params(_surface_terrain)
#physics_material_override.bounce = params.bounce
angular_damp = params.angular_damp angular_damp = params.angular_damp
linear_damp = params.linear_damp linear_damp = params.linear_damp
@ -175,6 +175,8 @@ func _physics_process(delta: float) -> void:
_shot_time_s += delta _shot_time_s += delta
_surface_time_s += delta _surface_time_s += delta
physics_material_override.bounce = terrain_physics.get_params(_surface_terrain).bounce
func enter_zone(zone: BallZone) -> void: func enter_zone(zone: BallZone) -> void:
_zones.push_back(zone) _zones.push_back(zone)

View File

@ -0,0 +1,77 @@
[gd_resource type="Resource" script_class="TerrainPhysics" load_steps=13 format=3 uid="uid://c6tt1hto75ex4"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/terrain_physics/terrain_parameters.gd" id="1_45pis"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/terrain_physics/terrain_physics.gd" id="2_yuehx"]
[sub_resource type="Resource" id="Resource_casfi"]
script = ExtResource("1_45pis")
linear_damp = 1.15
angular_damp = 3.0
bounce = 0.9
[sub_resource type="Resource" id="Resource_3k63c"]
script = ExtResource("1_45pis")
linear_damp = 0.0
angular_damp = 0.0
bounce = 0.5
[sub_resource type="Resource" id="Resource_xf73q"]
script = ExtResource("1_45pis")
linear_damp = 4.4
angular_damp = 4.0
bounce = 0.4
[sub_resource type="Resource" id="Resource_nhn3l"]
script = ExtResource("1_45pis")
linear_damp = 0.86
angular_damp = 1.0
bounce = 0.9
[sub_resource type="Resource" id="Resource_m3wjo"]
script = ExtResource("1_45pis")
linear_damp = 2.3
angular_damp = 4.0
bounce = 0.4
[sub_resource type="Resource" id="Resource_h4rld"]
script = ExtResource("1_45pis")
linear_damp = 1.62
angular_damp = 1.0
bounce = 0.9
[sub_resource type="Resource" id="Resource_j6lib"]
script = ExtResource("1_45pis")
linear_damp = 4.7
angular_damp = 2.0
bounce = 0.6
[sub_resource type="Resource" id="Resource_7f7ql"]
script = ExtResource("1_45pis")
linear_damp = 7.6
angular_damp = 4.0
bounce = 0.3
[sub_resource type="Resource" id="Resource_pusmf"]
script = ExtResource("1_45pis")
linear_damp = 12.0
angular_damp = 32.0
bounce = 0.0
[sub_resource type="Resource" id="Resource_edkxb"]
script = ExtResource("1_45pis")
linear_damp = 1.55
angular_damp = 1.3
bounce = 0.8
[resource]
script = ExtResource("2_yuehx")
default = SubResource("Resource_3k63c")
rough = SubResource("Resource_7f7ql")
fairway = SubResource("Resource_xf73q")
green = SubResource("Resource_m3wjo")
sand = SubResource("Resource_pusmf")
concrete = SubResource("Resource_casfi")
rock = SubResource("Resource_j6lib")
wood = SubResource("Resource_edkxb")
metal = SubResource("Resource_h4rld")
glass = SubResource("Resource_nhn3l")

View File

@ -1,10 +1,8 @@
[gd_scene load_steps=38 format=3 uid="uid://dfttci386ohip"] [gd_scene load_steps=26 format=3 uid="uid://dfttci386ohip"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/game_ball.gd" id="1_iwh2u"] [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/game_ball.gd" id="1_iwh2u"]
[ext_resource type="PhysicsMaterial" uid="uid://3bih72l068ic" path="res://src/equipment/balls/physics_ball/normal_physics.tres" id="1_l23pw"] [ext_resource type="Resource" uid="uid://c6tt1hto75ex4" path="res://src/equipment/balls/physics_ball/normal_terrain_physics.tres" id="3_3gnie"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/terrain_physics/terrain_physics.gd" id="3_52hui"]
[ext_resource type="Material" uid="uid://dpsmjlhjpc7vs" path="res://assets/materials/basic_ball_material.tres" id="3_rc7m1"] [ext_resource type="Material" uid="uid://dpsmjlhjpc7vs" path="res://assets/materials/basic_ball_material.tres" id="3_rc7m1"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/terrain_physics/terrain_parameters.gd" id="4_onl6o"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/ball_sfx.gd" id="5_bhshl"] [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/ball_sfx.gd" id="5_bhshl"]
[ext_resource type="AudioStream" uid="uid://cayyndwmxua5x" path="res://assets/sound/sfx/ball/grass2.wav" id="7_l22cv"] [ext_resource type="AudioStream" uid="uid://cayyndwmxua5x" path="res://assets/sound/sfx/ball/grass2.wav" id="7_l22cv"]
[ext_resource type="AudioStream" uid="uid://orisjdcj3mes" path="res://assets/sound/sfx/ball/concrete3.wav" id="7_t2ak2"] [ext_resource type="AudioStream" uid="uid://orisjdcj3mes" path="res://assets/sound/sfx/ball/concrete3.wav" id="7_t2ak2"]
@ -17,68 +15,8 @@
[ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="12_guipt"] [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="12_guipt"]
[ext_resource type="PackedScene" uid="uid://cm4bb3lg4mfd2" path="res://src/world/effects/splash/splash_effect.tscn" id="12_qlrvx"] [ext_resource type="PackedScene" uid="uid://cm4bb3lg4mfd2" path="res://src/world/effects/splash/splash_effect.tscn" id="12_qlrvx"]
[sub_resource type="Resource" id="Resource_casfi"] [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_u134x"]
script = ExtResource("4_onl6o") bounce = 0.4
linear_damp = 0.0
angular_damp = 1.4
[sub_resource type="Resource" id="Resource_3k63c"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 0.0
[sub_resource type="Resource" id="Resource_xf73q"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 2.0
[sub_resource type="Resource" id="Resource_nhn3l"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 0.6
[sub_resource type="Resource" id="Resource_m3wjo"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 1.0
[sub_resource type="Resource" id="Resource_h4rld"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 0.9
[sub_resource type="Resource" id="Resource_j6lib"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 2.5
[sub_resource type="Resource" id="Resource_7f7ql"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 4.0
[sub_resource type="Resource" id="Resource_pusmf"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 8.0
[sub_resource type="Resource" id="Resource_edkxb"]
script = ExtResource("4_onl6o")
linear_damp = 0.0
angular_damp = 0.9
[sub_resource type="Resource" id="Resource_3ngau"]
script = ExtResource("3_52hui")
default = SubResource("Resource_3k63c")
rough = SubResource("Resource_7f7ql")
fairway = SubResource("Resource_xf73q")
green = SubResource("Resource_m3wjo")
sand = SubResource("Resource_pusmf")
concrete = SubResource("Resource_casfi")
rock = SubResource("Resource_j6lib")
wood = SubResource("Resource_edkxb")
metal = SubResource("Resource_h4rld")
glass = SubResource("Resource_nhn3l")
[sub_resource type="SphereMesh" id="SphereMesh_y0d13"] [sub_resource type="SphereMesh" id="SphereMesh_y0d13"]
material = ExtResource("3_rc7m1") material = ExtResource("3_rc7m1")
@ -196,7 +134,7 @@ size = Vector2(0.2, 0.2)
[node name="PhysicsBall" type="RigidBody3D"] [node name="PhysicsBall" type="RigidBody3D"]
mass = 0.05 mass = 0.05
physics_material_override = ExtResource("1_l23pw") physics_material_override = SubResource("PhysicsMaterial_u134x")
sleeping = true sleeping = true
freeze = true freeze = true
continuous_cd = true continuous_cd = true
@ -205,7 +143,7 @@ max_contacts_reported = 3
linear_damp_mode = 1 linear_damp_mode = 1
angular_damp_mode = 1 angular_damp_mode = 1
script = ExtResource("1_iwh2u") script = ExtResource("1_iwh2u")
terrain_physics = SubResource("Resource_3ngau") terrain_physics = ExtResource("3_3gnie")
[node name="BallMesh" type="MeshInstance3D" parent="."] [node name="BallMesh" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_y0d13") mesh = SubResource("SphereMesh_y0d13")

View File

@ -1,5 +1,10 @@
class_name TerrainParameters extends Resource class_name TerrainParameters extends Resource
## Physical parameters for an individual terrain type. ## Physical parameters for an individual terrain type.
## Linear damping applied while in contact with the terrain surface.
@export var linear_damp := 0.0 @export var linear_damp := 0.0
## Angular damping applied while in contact with the terrain surface.
@export var angular_damp := 0.0 @export var angular_damp := 0.0
## Physical bounciness of the terrain. Use this instead of the physics material override.
@export var bounce := 0.0

View File

@ -38,7 +38,7 @@ const BIG_POWER_THRESHOLD := 0.7
const WATER_DAMAGE := 10.0 const WATER_DAMAGE := 10.0
## Angle of influence that shot curve has, in radians ## Angle of influence that shot curve has, in radians
const CURVE_INFLUENCE := PI / 16 const CURVE_INFLUENCE := PI / 3
## Just enough to make things interesting! ## Just enough to make things interesting!
const SHOT_OFFSET_X_FACTOR := 20.0 const SHOT_OFFSET_X_FACTOR := 20.0
@ -48,7 +48,7 @@ const SHOT_OFFSET_Z_FACTOR := 2.0 / 45.0
const CURVE_FACTOR := 0.002 const CURVE_FACTOR := 0.002
## Maximum absolute curve for the "nice shot" animation to play ## Maximum absolute curve for the "nice shot" animation to play
const NICE_THRESHOLD := 0.2 const NICE_THRESHOLD := 0.05
## Force by which explosions knock the ball away ## Force by which explosions knock the ball away
const EXPLOSIVE_FORCE_FACTOR := 0.12 const EXPLOSIVE_FORCE_FACTOR := 0.12
@ -292,7 +292,7 @@ func take_shot() -> void:
print_debug("Shot impulse: ", impulse, "; ", impulse.length(), " N*s") print_debug("Shot impulse: ", impulse, "; ", impulse.length(), " N*s")
# Curve the curve # Curve the curve
var curve := shot_curve * absf(shot_curve) * CURVE_FACTOR var curve := shot_curve * CURVE_FACTOR
# Position where the ball is hit (imparts spin) # Position where the ball is hit (imparts spin)
var offset := ( var offset := (

View File

@ -426,7 +426,6 @@ stream_0/stream = ExtResource("15_fn6g1")
[node name="ShotSetup" type="Node3D"] [node name="ShotSetup" type="Node3D"]
script = ExtResource("1_r6ei4") script = ExtResource("1_r6ei4")
perfect_aim = true
[node name="BallPoint" type="Node3D" parent="."] [node name="BallPoint" type="Node3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true

View File

@ -0,0 +1,53 @@
[gd_scene load_steps=8 format=3 uid="uid://c6k44l0mnq3o1"]
[sub_resource type="Gradient" id="Gradient_tuj3x"]
offsets = PackedFloat32Array(0, 0.0850112, 0.693512, 0.760626)
colors = PackedColorArray(3, 3, 3, 1, 2, 2, 0.6, 1, 1, 0.0623333, 0.03, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_d6li3"]
gradient = SubResource("Gradient_tuj3x")
[sub_resource type="Curve" id="Curve_oo5uu"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.0842105, 1), 0.0, 0.0, 0, 0, Vector2(0.246316, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="CurveTexture" id="CurveTexture_quj8c"]
curve = SubResource("Curve_oo5uu")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hjkte"]
lifetime_randomness = 0.52
emission_shape = 3
emission_box_extents = Vector3(1, 1, 1)
direction = Vector3(0, 0, 0)
spread = 180.0
initial_velocity_min = 4.0
initial_velocity_max = 4.0
gravity = Vector3(0, 0, 0)
scale_min = 0.3
scale_curve = SubResource("CurveTexture_quj8c")
color_ramp = SubResource("GradientTexture1D_d6li3")
turbulence_enabled = true
turbulence_noise_speed = Vector3(1, 1, 1)
turbulence_noise_speed_random = 1.41
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fliyi"]
vertex_color_use_as_albedo = true
emission_enabled = true
billboard_mode = 3
billboard_keep_scale = true
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="SphereMesh" id="SphereMesh_ggspd"]
material = SubResource("StandardMaterial3D_fliyi")
radius = 1.0
height = 2.0
[node name="ExplosionEffect" type="GPUParticles3D"]
lifetime = 0.7
explosiveness = 0.92
fixed_fps = 60
interpolate = false
process_material = SubResource("ParticleProcessMaterial_hjkte")
draw_pass_1 = SubResource("SphereMesh_ggspd")

View File

@ -2,8 +2,8 @@
[ext_resource type="Script" path="res://src/world/world.gd" id="1_ybjyx"] [ext_resource type="Script" path="res://src/world/world.gd" id="1_ybjyx"]
[ext_resource type="Script" path="res://src/player/world_player.gd" id="2_e743i"] [ext_resource type="Script" path="res://src/player/world_player.gd" id="2_e743i"]
[ext_resource type="PackedScene" uid="uid://cvs546kk7t7aw" path="res://levels/terrain_test/terrain_test.tscn" id="2_hbpi4"]
[ext_resource type="Script" path="res://src/ui/world_ui.gd" id="2_imewa"] [ext_resource type="Script" path="res://src/ui/world_ui.gd" id="2_imewa"]
[ext_resource type="PackedScene" uid="uid://bm2o3mex10v11" path="res://levels/debug_level/debug_level.tscn" id="2_l08a0"]
[ext_resource type="Resource" uid="uid://crock3revdn73" path="res://src/player/debug_player.tres" id="3_pyw81"] [ext_resource type="Resource" uid="uid://crock3revdn73" path="res://src/player/debug_player.tres" id="3_pyw81"]
[ext_resource type="Script" path="res://src/world/play_manager/practice_manager.gd" id="5_yk526"] [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://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="7_0gd42"]
@ -155,7 +155,7 @@ _data = {
[node name="World" type="Node" groups=["WorldGroup"]] [node name="World" type="Node" groups=["WorldGroup"]]
script = ExtResource("1_ybjyx") script = ExtResource("1_ybjyx")
initial_level = ExtResource("2_l08a0") initial_level = ExtResource("2_hbpi4")
manager = SubResource("Resource_hpydy") manager = SubResource("Resource_hpydy")
[node name="Level" type="Node3D" parent="."] [node name="Level" type="Node3D" parent="."]