add collisions to settings panels

This commit is contained in:
Nitwel 2024-05-28 14:42:49 +02:00
parent 8a7a0e9813
commit 5fc788d1e3
7 changed files with 49 additions and 22 deletions

View File

@ -1,4 +1,4 @@
extends Node3D
extends StaticBody3D
const Camera = preload ("./camera.gd")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://dejilst6cwqvi"]
[gd_scene load_steps=10 format=3 uid="uid://dejilst6cwqvi"]
[ext_resource type="Script" path="res://content/entities/camera/settings.gd" id="1_1ixy6"]
[ext_resource type="PackedScene" uid="uid://dnam3fe36gg62" path="res://content/ui/components/panel/panel.tscn" id="1_myvk1"]
@ -7,7 +7,7 @@
[ext_resource type="PackedScene" uid="uid://pk5k1q8bx0rj" path="res://content/ui/components/slider/slider.tscn" id="4_t8xp5"]
[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="5_opf0y"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_oovyb"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_smnuk"]
resource_local_to_scene = true
render_priority = 10
shader = ExtResource("2_wwobq")
@ -22,15 +22,20 @@ shader_parameter/corner_radius = 0.2
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_cftc5"]
[sub_resource type="QuadMesh" id="QuadMesh_jill0"]
size = Vector2(0.3, 0.2)
[node name="Settings" type="Node3D"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ctomk"]
size = Vector3(0.3, 0.2, 0.02)
[node name="Settings" type="StaticBody3D"]
collision_layer = 6
collision_mask = 0
script = ExtResource("1_1ixy6")
[node name="Panel" parent="." instance=ExtResource("1_myvk1")]
material_override = SubResource("ShaderMaterial_oovyb")
mesh = SubResource("QuadMesh_cftc5")
material_override = SubResource("ShaderMaterial_smnuk")
mesh = SubResource("QuadMesh_jill0")
skeleton = NodePath("../..")
size = Vector2(0.3, 0.2)
@ -96,3 +101,7 @@ value = 1.0
step = 1.0
label_unit = "FPS"
size = Vector3(0.11, 0.02, 0.01)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.01)
shape = SubResource("BoxShape3D_ctomk")

View File

@ -1,4 +1,4 @@
extends Node3D
extends StaticBody3D
const Light = preload ("./light.gd")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://de34yde00ngkv"]
[gd_scene load_steps=9 format=3 uid="uid://de34yde00ngkv"]
[ext_resource type="PackedScene" uid="uid://dnam3fe36gg62" path="res://content/ui/components/panel/panel.tscn" id="1_78ups"]
[ext_resource type="Script" path="res://content/entities/light/settings.gd" id="1_gw2gi"]
@ -6,7 +6,7 @@
[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="3_2gpr3"]
[ext_resource type="PackedScene" uid="uid://blrhy2uccrdn4" path="res://content/ui/components/input/input.tscn" id="4_upyp3"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_vmdy0"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_t0vpw"]
resource_local_to_scene = true
render_priority = 10
shader = ExtResource("2_m4moa")
@ -21,16 +21,21 @@ shader_parameter/corner_radius = 0.2
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_qu5ku"]
[sub_resource type="QuadMesh" id="QuadMesh_s453u"]
size = Vector2(0.3, 0.25)
[node name="Settings" type="Node3D"]
[sub_resource type="BoxShape3D" id="BoxShape3D_bu024"]
size = Vector3(0.3, 0.25, 0.02)
[node name="Settings" type="StaticBody3D"]
collision_layer = 6
collision_mask = 0
script = ExtResource("1_gw2gi")
[node name="Panel" parent="." instance=ExtResource("1_78ups")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -7.45058e-09, 0)
material_override = SubResource("ShaderMaterial_vmdy0")
mesh = SubResource("QuadMesh_qu5ku")
material_override = SubResource("ShaderMaterial_t0vpw")
mesh = SubResource("QuadMesh_s453u")
skeleton = NodePath("../..")
size = Vector2(0.3, 0.25)
@ -110,3 +115,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00999999, -0.08, 0)
label = "check"
icon = true
toggleable = true
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.01)
shape = SubResource("BoxShape3D_bu024")

View File

@ -10,7 +10,7 @@
size = Vector3(0.5, 0.3, 0.001)
[node name="LineChart" type="StaticBody3D"]
collision_layer = 5
collision_layer = 6
collision_mask = 0
script = ExtResource("1_5dxim")

View File

@ -1,4 +1,4 @@
extends Node3D
extends StaticBody3D
const LineChart = preload ("./line_chart.gd")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://q5p1701gdfiq"]
[gd_scene load_steps=10 format=3 uid="uid://q5p1701gdfiq"]
[ext_resource type="Script" path="res://content/entities/line_chart/settings.gd" id="1_xxfkt"]
[ext_resource type="PackedScene" uid="uid://dnam3fe36gg62" path="res://content/ui/components/panel/panel.tscn" id="2_4g761"]
@ -7,7 +7,7 @@
[ext_resource type="PackedScene" uid="uid://blrhy2uccrdn4" path="res://content/ui/components/input/input.tscn" id="5_ecnnd"]
[ext_resource type="PackedScene" uid="uid://wgnowarejk5y" path="res://content/ui/components/select/select.tscn" id="6_egqee"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_boysj"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3ewpv"]
resource_local_to_scene = true
render_priority = 10
shader = ExtResource("3_vjmg5")
@ -22,15 +22,20 @@ shader_parameter/corner_radius = 0.2
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_e21ey"]
[sub_resource type="QuadMesh" id="QuadMesh_t2fh8"]
size = Vector2(0.3, 0.2)
[node name="Settings" type="Node3D"]
[sub_resource type="BoxShape3D" id="BoxShape3D_53oq0"]
size = Vector3(0.3, 0.2, 0.02)
[node name="Settings" type="StaticBody3D"]
collision_layer = 6
collision_mask = 0
script = ExtResource("1_xxfkt")
[node name="Panel" parent="." instance=ExtResource("2_4g761")]
material_override = SubResource("ShaderMaterial_boysj")
mesh = SubResource("QuadMesh_e21ey")
material_override = SubResource("ShaderMaterial_3ewpv")
mesh = SubResource("QuadMesh_t2fh8")
skeleton = NodePath("../..")
size = Vector2(0.3, 0.2)
@ -83,3 +88,7 @@ options = {
4: "Last Year"
}
size = Vector3(0.16, 0.03, 0.01)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.01)
shape = SubResource("BoxShape3D_53oq0")