3D Cameras with sweep and animation

This commit is contained in:
Marco 2025-06-27 15:06:33 +02:00
commit 7e76edc153
48 changed files with 3211 additions and 1511 deletions

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=8 format=3 uid="uid://cpx5yjfg3a2hw"]
[gd_scene load_steps=9 format=3 uid="uid://cpx5yjfg3a2hw"]
[ext_resource type="Script" uid="uid://dxhf1twoxf4j0" path="res://Scripts/Interactables/AlarmBox3D.cs" id="1_4ysgp"]
[ext_resource type="AudioStream" uid="uid://bjvklk7qmlivd" path="res://SFX/288963__littlerobotsoundfactory__click_electronic_14.wav" id="3_5t8l3"]
[ext_resource type="PackedScene" uid="uid://s4yb3i3td11j" path="res://3D/BlockbenchModels/AlarmBox/Alarm_Box.gltf" id="4_4ysgp"]
[ext_resource type="Script" uid="uid://0g2sdu48c2x8" path="res://Scripts/Actors/3D/AlarmSoundPlayer3D.cs" id="4_t4kxh"]
[sub_resource type="SphereShape3D" id="SphereShape3D_itd0i"]
radius = 0.419927
@ -55,7 +56,7 @@ metadata/_edit_group_ = true
shape = SubResource("SphereShape3D_itd0i")
[node name="ActivationSound" type="AudioStreamPlayer3D" parent="."]
visible = false
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.197789)
stream = ExtResource("3_5t8l3")
bus = &"Effects"
@ -66,4 +67,13 @@ libraries = {
&"": SubResource("AnimationLibrary_t4kxh")
}
[node name="AlarmSound" type="AudioStreamPlayer3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.198581)
volume_db = -5.551
max_distance = 25.08
bus = &"Effects"
script = ExtResource("4_t4kxh")
[connection signal="PlayActivationSound" from="." to="ActivationSound" method="play"]
[editable path="blockbench_export"]

View file

@ -1,20 +1,48 @@
[gd_scene load_steps=5 format=3 uid="uid://b0rhxqjs52fsv"]
[gd_scene load_steps=6 format=3 uid="uid://b0rhxqjs52fsv"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_ix4p0"]
[ext_resource type="Script" uid="uid://dg3aho2ulfngs" path="res://Scripts/Actors/3D/SecurityCamera3D.cs" id="1_tkk1t"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/Explosion_Harmless_Small_3D.tres" id="2_1t1m8"]
[ext_resource type="PackedScene" uid="uid://bt5weyaiyhtrl" path="res://3D/BlockbenchModels/Camera/Camera.gltf" id="2_ix4p0"]
[ext_resource type="Script" uid="uid://cmgcelj1qxg8o" path="res://addons/tattomoosa.vision_cone_3d/src/VisionCone3D.gd" id="4_f1teg"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(0.763428, 0.469452, 0.77832)
[sub_resource type="CylinderShape3D" id="CylinderShape3D_f1teg"]
[node name="Camera" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_layer = 64
collision_mask = 0
script = ExtResource("1_ix4p0")
script = ExtResource("1_tkk1t")
Health = 6.0
ExplosionData = ExtResource("2_1t1m8")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
shape = SubResource("BoxShape3D_hsg1w")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, -0.419623, -0.000488281)
shape = SubResource("CylinderShape3D_f1teg")
[node name="blockbench_export" parent="." instance=ExtResource("2_ix4p0")]
[node name="Camera" parent="blockbench_export/Node/Model" index="0"]
transform = Transform3D(0.819152, 0.148453, -0.554032, 0, 0.965926, 0.258819, 0.573576, -0.212012, 0.79124, 0, 0.25, -0.0625)
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="blockbench_export/Node/Model/Camera" index="2"]
transform = Transform3D(1, -1.86265e-09, 0, 1.86265e-09, 1, 1.49012e-08, 0, -4.47035e-08, 1, -0.0399265, 0.00923264, -0.611748)
remote_path = NodePath("../../../../../VisionCone3D")
update_scale = false
[node name="VisionCone3D" type="Area3D" parent="."]
transform = Transform3D(0.819145, 0.148452, -0.554027, 1.79916e-09, 0.965925, 0.258817, 0.573572, -0.212012, 0.791233, 0.307593, 0.100586, -0.571398)
collision_layer = 32
collision_mask = 2
script = ExtResource("4_f1teg")
range = 5.62515
angle = 63.7926
debug_draw = true
vision_test_mode = 0
collision_layer_ = 32
collision_mask_ = 2
collision_environment_mask = 17
metadata/_custom_type_script = "uid://cmgcelj1qxg8o"
[connection signal="AnimationStart" from="." to="blockbench_export/AnimationPlayer" method="play"]
[connection signal="body_sighted" from="VisionCone3D" to="." method="OnBodySighted"]
[editable path="blockbench_export"]