Debug boxes

This commit is contained in:
Marco 2025-07-02 10:34:14 +02:00
commit d35af0dc2a
9 changed files with 50 additions and 4 deletions

View file

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

View file

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

View file

@ -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

View file

@ -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)

View file

@ -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);
}
}

View file

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

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

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