added oktoberfest scene nad interactables

This commit is contained in:
LaptopmanMann 2025-09-17 16:11:23 +02:00
parent bffa08732d
commit 9a436c631f
11 changed files with 222 additions and 4 deletions

View file

@ -0,0 +1,12 @@
class_name Interactable
extends Area3D
signal interact
func _ready():
interact.connect(_debug)
func _debug():
print("ICH WURDE ITNERGAIRERT!")

View file

@ -0,0 +1 @@
uid://cjxx7f0186bxr

View file

@ -0,0 +1,21 @@
[gd_scene load_steps=5 format=3 uid="uid://byhsp6ujjsh8m"]
[ext_resource type="Script" uid="uid://cjxx7f0186bxr" path="res://Florian/Entity/interactable.gd" id="1_pm3my"]
[sub_resource type="BoxShape3D" id="BoxShape3D_pm3my"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pm3my"]
albedo_color = Color(1, 0.290196, 1, 1)
[sub_resource type="BoxMesh" id="BoxMesh_pm3my"]
material = SubResource("StandardMaterial3D_pm3my")
[node name="Interactable" type="Area3D"]
script = ExtResource("1_pm3my")
[node name="InteractableHitBox" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_pm3my")
debug_color = Color(0.976471, 0, 0.215686, 1)
[node name="DebugInteractableVisual" type="MeshInstance3D" parent="InteractableHitBox"]
mesh = SubResource("BoxMesh_pm3my")

View file

@ -1,8 +1,15 @@
[gd_scene load_steps=7 format=3 uid="uid://by5cq6m32hbor"]
[gd_scene load_steps=14 format=3 uid="uid://by5cq6m32hbor"]
[ext_resource type="Texture2D" uid="uid://dv401srtwuvtg" path="res://icon.svg" id="1_6v0xc"]
[ext_resource type="PackedScene" uid="uid://crrco762ow56c" path="res://Florian/Player/PlayerRigidbody.tscn" id="2_82wr0"]
[ext_resource type="PackedScene" uid="uid://dvrnfjtmupucv" path="res://Florian/Props/table.tscn" id="3_tw6g5"]
[ext_resource type="PackedScene" uid="uid://bobfhgsydmmr2" path="res://Florian/pyro.tscn" id="4_h8052"]
[ext_resource type="PackedScene" uid="uid://byhsp6ujjsh8m" path="res://Florian/Entity/interactable.tscn" id="5_ygtpi"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="6_miqpv"]
[ext_resource type="PackedScene" uid="uid://bk4djtjemu7we" path="res://Florian/Entity/People/guitar.tscn" id="6_ptxqs"]
[ext_resource type="PackedScene" uid="uid://c5552lenumx2j" path="res://Florian/Entity/People/saxophone.tscn" id="7_miqpv"]
[ext_resource type="PackedScene" uid="uid://bybsn53hd1mge" path="res://Florian/Entity/People/guys.tscn" id="9_3box6"]
[ext_resource type="PackedScene" uid="uid://k3ij7wrtwpms" path="res://Florian/table_0.tscn" id="10_ubr03"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_eral8"]
albedo_texture = ExtResource("1_6v0xc")
@ -30,3 +37,106 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 2)
[node name="Table2" parent="." instance=ExtResource("3_tw6g5")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 1, 1)
[node name="Stage" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -8)
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="Stage"]
use_collision = true
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="Stage/CSGCombiner3D"]
radius = 4.0
[node name="Pyro" parent="Stage" instance=ExtResource("4_h8052")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.6, 0.9, 2.6)
[node name="Pyro2" parent="Stage" instance=ExtResource("4_h8052")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.4, 0.9, 2.6)
[node name="Pyro3" parent="Stage" instance=ExtResource("4_h8052")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.6, 0.9, -2.4)
[node name="Pyro4" parent="Stage" instance=ExtResource("4_h8052")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.4, 0.9, -2.4)
[node name="Interactable" parent="Stage" instance=ExtResource("5_ygtpi")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.4, 0.9, 1)
[node name="Truss" type="Node3D" parent="Stage"]
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="Stage/Truss"]
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="Stage/Truss/CSGCombiner3D"]
radius = 15.0
height = 16.0
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="Stage/Truss/CSGCombiner3D/CSGCylinder3D"]
operation = 2
radius = 14.0
height = 16.0
[node name="CSGCylinder3D2" type="CSGCylinder3D" parent="Stage/Truss/CSGCombiner3D/CSGCylinder3D"]
operation = 2
radius = 15.0
height = 14.0
[node name="Lights" type="Node3D" parent="Stage/Truss/CSGCombiner3D"]
[node name="SpotLight3D" type="SpotLight3D" parent="Stage/Truss/CSGCombiner3D/Lights"]
transform = Transform3D(1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, 0, 7, 14)
light_color = Color(1, 1, 0, 1)
spot_range = 30.0
spot_attenuation = 0.4
[node name="SpotLight3D2" type="SpotLight3D" parent="Stage/Truss/CSGCombiner3D/Lights"]
transform = Transform3D(-4.37114e-08, 0.5, -0.866025, 0, 0.866025, 0.5, 1, 2.18557e-08, -3.78552e-08, -14, 7, -6.11959e-07)
light_color = Color(1, 1, 0, 1)
spot_range = 30.0
spot_attenuation = 0.4
[node name="SpotLight3D3" type="SpotLight3D" parent="Stage/Truss/CSGCombiner3D/Lights"]
transform = Transform3D(-1, -4.37114e-08, 7.57103e-08, 0, 0.866025, 0.5, -8.74228e-08, 0.5, -0.866025, 9.53674e-07, 7, -14)
light_color = Color(1, 1, 0, 1)
spot_range = 30.0
spot_attenuation = 0.4
[node name="SpotLight3D4" type="SpotLight3D" parent="Stage/Truss/CSGCombiner3D/Lights"]
transform = Transform3D(1.31134e-07, -0.5, 0.866025, 0, 0.866025, 0.5, -1, -6.55671e-08, 1.13566e-07, 14, 7, 1.83588e-06)
light_color = Color(1, 1, 0, 1)
spot_range = 30.0
spot_attenuation = 0.4
[node name="PointThing" parent="Stage/Truss/CSGCombiner3D/Lights" instance=ExtResource("6_miqpv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
points_worth = 50
points_name = "Stage Lights"
points_multiplier = 1.5
[node name="guitar" parent="Stage/Truss/CSGCombiner3D" instance=ExtResource("6_ptxqs")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 0)
[node name="saxophone" parent="Stage/Truss/CSGCombiner3D" instance=ExtResource("7_miqpv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 0)
[node name="DancingPeople" type="Node3D" parent="Stage"]
transform = Transform3D(0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, 0, 0, 0)
[node name="guys" parent="Stage/DancingPeople" instance=ExtResource("9_3box6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0.9, 0)
[node name="guys2" parent="Stage/DancingPeople" instance=ExtResource("9_3box6")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, -4.24264, 0.9, 4.24264)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 0, 0)
shadow_enabled = true
[node name="Backstage" type="Node3D" parent="."]
[node name="table0" parent="." instance=ExtResource("10_ubr03")]
transform = Transform3D(0.45, 0, 0, 0, 0.45, 0, 0, 0, 0.45, 0, 0, 3)
[connection signal="interact" from="Stage/Interactable" to="Stage/Pyro" method="_turn_on_off"]
[connection signal="interact" from="Stage/Interactable" to="Stage/Pyro2" method="_turn_on_off"]
[connection signal="interact" from="Stage/Interactable" to="Stage/Pyro3" method="_turn_on_off"]
[connection signal="interact" from="Stage/Interactable" to="Stage/Pyro4" method="_turn_on_off"]

View file

@ -28,15 +28,17 @@ shape = SubResource("CylinderShape3D_qqgab")
[node name="RotationHelper" type="Node3D" parent="BoundingBox"]
[node name="Interact" type="Node3D" parent="BoundingBox/RotationHelper"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
[node name="InteractRay" type="RayCast3D" parent="BoundingBox/RotationHelper/Interact"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
target_position = Vector3(0, 0, -4)
collide_with_areas = true
collide_with_bodies = false
debug_shape_custom_color = Color(1, 0, 0, 1)
debug_shape_thickness = 1
[node name="CoolCamera" parent="BoundingBox/RotationHelper" node_paths=PackedStringArray("player") instance=ExtResource("2_leq5j")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
player = NodePath("../../..")
[node name="ThirdPerson" type="Node3D" parent="BoundingBox"]

View file

@ -4,6 +4,7 @@ extends RigidBody3D
@onready var camera = $BoundingBox/RotationHelper/CoolCamera
@onready var rotation_helper = $BoundingBox/RotationHelper
@onready var bounding_box = $BoundingBox
@onready var interact_ray: RayCast3D = $BoundingBox/RotationHelper/Interact/InteractRay
signal take_picture
@ -31,9 +32,21 @@ func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
pass
#Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _interact() -> void:
if interact_ray.is_colliding():
var obj = interact_ray.get_collider()
print(obj)
if obj is Interactable:
#print("Jetzt ist es ezit")
obj.interact.emit()
func _input(event):
if event.is_action_pressed("interact"):
_interact()
if event is InputEventKey:
if event.keycode == KEY_ESCAPE && event.is_pressed():
if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:

7
Florian/pyro.gd Normal file
View file

@ -0,0 +1,7 @@
extends Node3D
func _turn_on_off():
if visible:
hide()
else:
show()

1
Florian/pyro.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://dravmby4n0dwd

37
Florian/pyro.tscn Normal file
View file

@ -0,0 +1,37 @@
[gd_scene load_steps=6 format=3 uid="uid://bobfhgsydmmr2"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="1_o4o5a"]
[ext_resource type="Script" uid="uid://dravmby4n0dwd" path="res://Florian/pyro.gd" id="1_qbqit"]
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ydarf"]
direction = Vector3(0, 10, 0)
spread = 20.0
initial_velocity_min = 15.53
initial_velocity_max = 15.53
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_o4o5a"]
emission_enabled = true
emission = Color(0.97254, 0.877108, 0.233288, 1)
emission_energy_multiplier = 9.8
disable_receive_shadows = true
[sub_resource type="RibbonTrailMesh" id="RibbonTrailMesh_qbqit"]
material = SubResource("StandardMaterial3D_o4o5a")
size = 0.1
sections = 2
[node name="Pyro" type="Node3D"]
script = ExtResource("1_qbqit")
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
amount = 30
process_material = SubResource("ParticleProcessMaterial_ydarf")
draw_pass_1 = SubResource("RibbonTrailMesh_qbqit")
[node name="PointThing" parent="." instance=ExtResource("1_o4o5a")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
points_name = "Pyro"
points_multiplier = 1.2
[node name="CSGBox3D" type="CSGBox3D" parent="."]
size = Vector3(0.4, 1, 0.4)

9
Florian/table_0.tscn Normal file
View file

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://k3ij7wrtwpms"]
[ext_resource type="PackedScene" uid="uid://olc70hg5v5ou" path="res://Amanda/furni/table0.blend" id="1_xylfr"]
[node name="table0" instance=ExtResource("1_xylfr")]
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0)
[node name="Point" parent="." index="0"]
visible = false

View file

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="AllAroundTheWorld"
run/main_scene="uid://d1rip77vefx3i"
run/main_scene="uid://by5cq6m32hbor"
config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://icon.svg"
@ -52,3 +52,8 @@ take_picture={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
interact={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
]
}