diff --git a/3D/MapScenes/TestLevel2.tscn b/3D/MapScenes/TestLevel2.tscn index 4e5dbba2..ece81ab9 100644 --- a/3D/MapScenes/TestLevel2.tscn +++ b/3D/MapScenes/TestLevel2.tscn @@ -3173,6 +3173,7 @@ MovePos = Array[Vector3]([Vector3(0, 0, 0), Vector3(0, -2.0625, 0)]) Speed = 0.25 [node name="entity_132_mesh_instance" type="MeshInstance3D" parent="FuncGodotMap/entity_132_func_move"] +cast_shadow = 0 mesh = SubResource("ArrayMesh_8ya5p") [node name="entity_132_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_132_func_move"] @@ -3188,6 +3189,7 @@ MovePos = Array[Vector3]([Vector3(0, 0, 0), Vector3(0, -2.0625, 0)]) Speed = 0.25 [node name="entity_133_mesh_instance" type="MeshInstance3D" parent="FuncGodotMap/entity_133_func_move"] +cast_shadow = 0 mesh = SubResource("ArrayMesh_87e55") [node name="entity_133_collision_shape" type="CollisionShape3D" parent="FuncGodotMap/entity_133_func_move"] diff --git a/3D/Scenes/Props/Camera_3D.tscn b/3D/Scenes/Props/Camera_3D.tscn index 8d204622..252a9428 100644 --- a/3D/Scenes/Props/Camera_3D.tscn +++ b/3D/Scenes/Props/Camera_3D.tscn @@ -15,7 +15,7 @@ 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.419623, -0.000488281) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, -0.419623, -0.321457) shape = SubResource("CylinderShape3D_f1teg") [node name="blockbench_export" parent="." instance=ExtResource("2_ix4p0")] diff --git a/3D/TrenchBroom/EntityDefinitions/solid/funcs/func_move.tres b/3D/TrenchBroom/EntityDefinitions/solid/funcs/func_move.tres index 14c20a65..c3cc2914 100644 --- a/3D/TrenchBroom/EntityDefinitions/solid/funcs/func_move.tres +++ b/3D/TrenchBroom/EntityDefinitions/solid/funcs/func_move.tres @@ -11,7 +11,7 @@ spawn_type = 2 origin_type = 3 build_visuals = true use_in_baked_light = true -shadow_casting_setting = 1 +shadow_casting_setting = 0 build_occlusion = false render_layers = 1 collision_shape_type = 2 diff --git a/IsoTest/IsoMapTest2.tscn b/IsoTest/IsoMapTest2.tscn index ddcb9197..62812c79 100644 --- a/IsoTest/IsoMapTest2.tscn +++ b/IsoTest/IsoMapTest2.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://ec4m3geediis"] +[gd_scene load_steps=14 format=3 uid="uid://ec4m3geediis"] [ext_resource type="Script" uid="uid://ba0tf7ihw4hpp" path="res://Scripts/Misc/CameraController3D.cs" id="1_g4gcm"] [ext_resource type="Script" uid="uid://b8g8mflgsr5dc" path="res://Scripts/GameController.cs" id="1_joeuf"] @@ -7,6 +7,7 @@ [ext_resource type="Script" uid="uid://c5nxsq3tyxcx6" path="res://Scripts/InventoryManager.cs" id="3_itd0i"] [ext_resource type="Script" uid="uid://cnkipcolyj61w" path="res://Scripts/AlarmManager.cs" id="6_w4wji"] [ext_resource type="AudioStream" uid="uid://blohh20jktoyo" path="res://SFX/270641__phantastonia__alarm2.wav" id="7_5vm3d"] +[ext_resource type="Script" uid="uid://csruxpdnpj18r" path="res://Scripts/Actors/3D/PlayerStartMarker3D.cs" id="9_g4gcm"] [ext_resource type="PackedScene" uid="uid://rimplblbptcd" path="res://Scenes/Actors/IsoPlayer_FSM.tscn" id="12_g4gcm"] [ext_resource type="PackedScene" uid="uid://c8gtrjf2xeue7" path="res://3D/MapScenes/TestLevel.tscn" id="12_g83w3"] [ext_resource type="Script" uid="uid://dnslcy71dgea" path="res://Scripts/Misc/CameraTarget3D.cs" id="16_e2nai"] @@ -58,7 +59,8 @@ sky_mode = 1 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.84862, 0, -4.8932) [node name="StartPosition" type="Marker3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 121.891, -1.17626, -36.039) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 81.2404, 1.2967, -32.5207) +script = ExtResource("9_g4gcm") [node name="CameraTarget" type="Marker3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.0389, 2.33215, 3.16925) diff --git a/Scripts/Actors/3D/PlayerStartMarker3D.cs b/Scripts/Actors/3D/PlayerStartMarker3D.cs new file mode 100644 index 00000000..83d08273 --- /dev/null +++ b/Scripts/Actors/3D/PlayerStartMarker3D.cs @@ -0,0 +1,18 @@ +using Godot; + +namespace Cirno.Scripts.Actors._3D; + +[Tool] +public partial class PlayerStartMarker3D : Marker3D +{ + + private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f); + public override void _Process(double delta) + { + if (!Engine.IsEditorHint()) return; + + DebugDraw3D.DrawBox(this.GlobalPosition - _boxSize / 2, Quaternion.Identity, _boxSize, Colors.Green); + + //DebugDraw3D.DrawSphere(this.GlobalPosition, 0.1f, Colors.Green); + } +} \ No newline at end of file diff --git a/Scripts/Actors/3D/PlayerStartMarker3D.cs.uid b/Scripts/Actors/3D/PlayerStartMarker3D.cs.uid new file mode 100644 index 00000000..a2462fec --- /dev/null +++ b/Scripts/Actors/3D/PlayerStartMarker3D.cs.uid @@ -0,0 +1 @@ +uid://csruxpdnpj18r diff --git a/Scripts/Actors/EnemyMarker3D.cs b/Scripts/Actors/EnemyMarker3D.cs index 9311bba5..3ef65a57 100644 --- a/Scripts/Actors/EnemyMarker3D.cs +++ b/Scripts/Actors/EnemyMarker3D.cs @@ -8,6 +8,8 @@ namespace Cirno.Scripts.Actors; [Tool] public partial class EnemyMarker3D : PreviewMarker3D, IActivable { + private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f); + private EnemyResource _enemy; [Export] @@ -100,4 +102,13 @@ public partial class EnemyMarker3D : PreviewMarker3D, IActivable { Activate(); } + + public override void _Process(double delta) + { + if (!Engine.IsEditorHint()) return; + + DebugDraw3D.DrawBox(this.GlobalPosition - _boxSize / 2, Quaternion.Identity, _boxSize, Colors.Red); + + //DebugDraw3D.DrawSphere(this.GlobalPosition, 0.1f, Colors.Green); + } } \ No newline at end of file diff --git a/Scripts/Actors/ItemMarker3D.cs b/Scripts/Actors/ItemMarker3D.cs index d3a3e3ea..4b9f2541 100644 --- a/Scripts/Actors/ItemMarker3D.cs +++ b/Scripts/Actors/ItemMarker3D.cs @@ -7,6 +7,8 @@ namespace Cirno.Scripts.Actors; [Tool] public partial class ItemMarker3D : PreviewMarker3D { + private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f); + private LootItem _item; [Export] @@ -117,4 +119,13 @@ public partial class ItemMarker3D : PreviewMarker3D return Item.Spawn3D(this); } + + public override void _Process(double delta) + { + if (!Engine.IsEditorHint()) return; + + DebugDraw3D.DrawBox(this.GlobalPosition - _boxSize / 2, Quaternion.Identity, _boxSize, Colors.Blue); + + //DebugDraw3D.DrawSphere(this.GlobalPosition, 0.1f, Colors.Green); + } } \ No newline at end of file diff --git a/project.godot b/project.godot index 90d2e53b..896553d5 100644 --- a/project.godot +++ b/project.godot @@ -56,6 +56,7 @@ GlobalInputManager="*res://Scenes/Utils/GlobalInputManager.tscn" [debug_draw_3d] settings/addon_root_folder="res://addons/debug_draw_3d" +settings/3d/volumetric_defaults/thickness=0.01 [dialogic]