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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

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"]

View file

@ -0,0 +1,31 @@
[gd_resource type="Resource" script_class="FuncGodotFGDModelPointClass" load_steps=4 format=3 uid="uid://m0xahs14etiy"]
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_yxg7b"]
[ext_resource type="PackedScene" uid="uid://b0rhxqjs52fsv" path="res://3D/Scenes/Props/Camera_3D.tscn" id="2_yxg7b"]
[ext_resource type="Script" uid="uid://dkmyelig23ub5" path="res://addons/func_godot/src/fgd/func_godot_fgd_model_point_class.gd" id="3_mqd4f"]
[resource]
script = ExtResource("3_mqd4f")
target_map_editor = 1
models_sub_folder = ""
scale_expression = ""
generate_size_property = false
rotation_offset = Vector3(0, 180, 0)
generate_gd_ignore_file = false
scene_file = ExtResource("2_yxg7b")
apply_rotation_on_map_build = true
apply_scale_on_map_build = false
classname = "actor_securitycamera"
description = "Security Camera"
func_godot_internal = false
base_classes = Array[Resource]([ExtResource("1_yxg7b")])
class_properties = {}
class_property_descriptions = {}
auto_apply_to_matching_node_properties = false
meta_properties = {
"model": "\"3D/MapModels/actor_securitycamera.glb\"",
"size": AABB(-4, -4, -4, 4, 4, 4)
}
node_class = ""
name_property = ""
metadata/_custom_type_script = "uid://c83r7t467hm4m"

View file

@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=36 format=3 uid="uid://b700sa4be6dfa"]
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=37 format=3 uid="uid://b700sa4be6dfa"]
[ext_resource type="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
@ -35,6 +35,7 @@
[ext_resource type="Resource" uid="uid://bjqfsr0ws3kbi" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Teleporter.tres" id="32_elv2e"]
[ext_resource type="Resource" uid="uid://yw4443572o6u" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Furniture_Triangle.tres" id="33_aawmv"]
[ext_resource type="Resource" uid="uid://cr3xqfglolihb" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Furniture_ComputerTower.tres" id="34_wy0ht"]
[ext_resource type="Resource" uid="uid://m0xahs14etiy" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_SecurityCamera.tres" id="35_3jqmy"]
[resource]
script = ExtResource("1_lykim")
@ -42,5 +43,5 @@ export_file = false
target_map_editor = 1
fgd_name = "FuncGodot"
base_fgd_files = Array[Resource]([])
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb"), ExtResource("4_1nmxk"), ExtResource("5_ljb2x"), ExtResource("6_seuvu"), ExtResource("7_fmwex"), ExtResource("8_c8m8m"), ExtResource("9_14sjf"), ExtResource("10_xik3w"), ExtResource("11_dgiqm"), ExtResource("12_1teik"), ExtResource("13_f0hti"), ExtResource("14_6ld6e"), ExtResource("15_g8j5j"), ExtResource("16_7h4of"), ExtResource("17_m3sbm"), ExtResource("18_m3sbm"), ExtResource("19_hvhb8"), ExtResource("20_3v5us"), ExtResource("21_g67cj"), ExtResource("22_iy67w"), ExtResource("23_b5lmu"), ExtResource("24_ndas4"), ExtResource("25_n7wsi"), ExtResource("26_v48k5"), ExtResource("27_ombvk"), ExtResource("28_31lma"), ExtResource("29_louv0"), ExtResource("30_wfgfu"), ExtResource("31_elv2e"), ExtResource("32_elv2e"), ExtResource("33_aawmv"), ExtResource("34_wy0ht")])
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb"), ExtResource("4_1nmxk"), ExtResource("5_ljb2x"), ExtResource("6_seuvu"), ExtResource("7_fmwex"), ExtResource("8_c8m8m"), ExtResource("9_14sjf"), ExtResource("10_xik3w"), ExtResource("11_dgiqm"), ExtResource("12_1teik"), ExtResource("13_f0hti"), ExtResource("14_6ld6e"), ExtResource("15_g8j5j"), ExtResource("16_7h4of"), ExtResource("17_m3sbm"), ExtResource("18_m3sbm"), ExtResource("19_hvhb8"), ExtResource("20_3v5us"), ExtResource("21_g67cj"), ExtResource("22_iy67w"), ExtResource("23_b5lmu"), ExtResource("24_ndas4"), ExtResource("25_n7wsi"), ExtResource("26_v48k5"), ExtResource("27_ombvk"), ExtResource("28_31lma"), ExtResource("29_louv0"), ExtResource("30_wfgfu"), ExtResource("31_elv2e"), ExtResource("32_elv2e"), ExtResource("33_aawmv"), ExtResource("34_wy0ht"), ExtResource("35_3jqmy")])
metadata/_custom_type_script = "uid://cknmd0lgmorx2"