Mapping and direction code

This commit is contained in:
Marco 2025-09-25 10:25:10 +02:00
commit 944249d408
26 changed files with 1453 additions and 536 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://crxls5gk3wgin"
path="res://.godot/imported/Switch.gltf-8914c99fb2103d6bdcac0db657c31e11.scn"
[deps]
source_file="res://3D/BlockbenchModels/Switch/Switch.gltf"
dest_files=["res://.godot/imported/Switch.gltf-8914c99fb2103d6bdcac0db657c31e11.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1

BIN
3D/BlockbenchModels/Switch/Switch_0.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://nr444fep3diy"
path="res://.godot/imported/Switch_0.png-d1d34dc8a6359d39d22b2f33cc22ad5e.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "c242a4c3f0fae22081381fd1b86506af"
}
[deps]
source_file="res://3D/BlockbenchModels/Switch/Switch_0.png"
dest_files=["res://.godot/imported/Switch_0.png-d1d34dc8a6359d39d22b2f33cc22ad5e.ctex"]
[params]
compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
3D/BlockbenchModels/Switch/Switch_Texture.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ckddpaefmtp5x"
path="res://.godot/imported/Switch_Texture.png-1320f81b89a3f3dc2845275bcfd6ea36.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://3D/BlockbenchModels/Switch/Switch_Texture.png"
dest_files=["res://.godot/imported/Switch_Texture.png-1320f81b89a3f3dc2845275bcfd6ea36.ctex"]
[params]
compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

133
3D/Maps/Emitters.map Normal file
View file

@ -0,0 +1,133 @@
// Game: FuncGodot
// Format: Valve
// entity 0
{
"mapversion" "220"
"wad" ""
"classname" "worldspawn"
// brush 0
{
( -4 52 -16 ) ( -4 52 -15 ) ( -4 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 270 1 1
( 60 -76 16 ) ( 60 -76 17 ) ( 61 -76 16 ) __TB_empty [ 1 -1.8369701987210297e-16 0 4 ] [ 0 0 -1 0 ] 270 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor242 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 52 -16 ) ( -67 52 -16 ) ( -68 52 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 270 1 1
( 12 52 -16 ) ( 12 51 -16 ) ( 12 52 -15 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 0 1 1
}
// brush 1
{
( -68 -60 16 ) ( -68 -60 17 ) ( -68 -61 16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -4 ] [ 0 0 -1 0 ] 180 1 1
( 60 -68 24 ) ( 60 -68 25 ) ( 61 -68 24 ) __TB_empty [ 1 -1.8369701987210297e-16 0 4 ] [ 0 0 -1 0 ] 180 1 1
( -68 -60 16 ) ( -68 -61 16 ) ( -67 -60 16 ) __TB_empty [ 1.8369701987210297e-16 1 0 4 ] [ -1 1.8369701987210297e-16 0 -4 ] 90 1 1
( 60 -68 48 ) ( 61 -68 48 ) ( 60 -69 48 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -4 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( -68 -60 16 ) ( -67 -60 16 ) ( -68 -60 17 ) Floors/Floor247 [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 180 1 1
( 60 -68 24 ) ( 60 -69 24 ) ( 60 -68 25 ) __TB_empty [ 1.8369701987210297e-16 1 0 4 ] [ 0 0 -1 0 ] 180 1 1
}
// brush 2
{
( 12 52 -16 ) ( 12 52 -15 ) ( 12 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 180 1 1
( -68 -12 -16 ) ( -68 -12 -15 ) ( -67 -12 -16 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 0 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor242 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 4 -16 ) ( -67 4 -16 ) ( -68 4 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 270 1 1
( 60 -76 16 ) ( 60 -77 16 ) ( 60 -76 17 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ 0 0 -1 0 ] 270 1 1
}
// brush 3
{
( -68 52 -16 ) ( -68 52 -15 ) ( -68 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 270 1 1
( -68 -12 -16 ) ( -68 -12 -15 ) ( -67 -12 -16 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 0 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor242 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 4 -16 ) ( -67 4 -16 ) ( -68 4 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 270 1 1
( -4 52 -16 ) ( -4 51 -16 ) ( -4 52 -15 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 90 1 1
}
// brush 4
{
( -68 52 -16 ) ( -68 52 -15 ) ( -68 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 270 1 1
( 60 -76 16 ) ( 60 -76 17 ) ( 61 -76 16 ) __TB_empty [ 1 -1.8369701987210297e-16 0 4 ] [ 0 0 -1 0 ] 270 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor103 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 -12 -16 ) ( -67 -12 -16 ) ( -68 -12 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 180 1 1
( -4 52 -16 ) ( -4 51 -16 ) ( -4 52 -15 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 90 1 1
}
// brush 5
{
( -68 52 -16 ) ( -68 52 -15 ) ( -68 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 270 1 1
( -68 4 -16 ) ( -68 4 -15 ) ( -67 4 -16 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 90 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor103 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 52 -16 ) ( -67 52 -16 ) ( -68 52 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 270 1 1
( -4 52 -16 ) ( -4 51 -16 ) ( -4 52 -15 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 90 1 1
}
// brush 6
{
( 12 52 -16 ) ( 12 52 -15 ) ( 12 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 180 1 1
( 60 -76 16 ) ( 60 -76 17 ) ( 61 -76 16 ) __TB_empty [ 1 -1.8369701987210297e-16 0 4 ] [ 0 0 -1 0 ] 270 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor103 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 -12 -16 ) ( -67 -12 -16 ) ( -68 -12 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 180 1 1
( 60 -76 16 ) ( 60 -77 16 ) ( 60 -76 17 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ 0 0 -1 0 ] 270 1 1
}
// brush 7
{
( 12 52 -16 ) ( 12 52 -15 ) ( 12 51 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 180 1 1
( -68 4 -16 ) ( -68 4 -15 ) ( -67 4 -16 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 90 1 1
( -68 52 -16 ) ( -68 51 -16 ) ( -67 52 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 180 1 1
( 60 -76 16 ) ( 61 -76 16 ) ( 60 -77 16 ) Floors/Floor103 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 0 1 1
( -68 52 -16 ) ( -67 52 -16 ) ( -68 52 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 270 1 1
( 60 -76 16 ) ( 60 -77 16 ) ( 60 -76 17 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ 0 0 -1 0 ] 270 1 1
}
// brush 8
{
( -76 -68 24 ) ( -76 -68 25 ) ( -76 -69 24 ) __TB_empty [ -3.6739403974420594e-16 -1 0 -4 ] [ 0 0 -1 0 ] 90 1 1
( -76 -68 24 ) ( -77 -68 24 ) ( -76 -68 25 ) __TB_empty [ 1 -3.6739403974420594e-16 0 -20 ] [ 0 0 -1 0 ] 90 1 1
( -68 60 16 ) ( -69 60 16 ) ( -68 59 16 ) __TB_empty [ 1 -3.6739403974420594e-16 0 -20 ] [ 3.6739403974420594e-16 1 0 4 ] 270 1 1
( -76 -68 48 ) ( -76 -69 48 ) ( -77 -68 48 ) __TB_empty [ -1 3.6739403974420594e-16 0 20 ] [ 3.6739403974420594e-16 1 0 4 ] 180 1 1
( -68 68 16 ) ( -68 68 17 ) ( -69 68 16 ) __TB_empty [ -1 3.6739403974420594e-16 0 20 ] [ 0 0 -1 0 ] 0 1 1
( -68 60 16 ) ( -68 59 16 ) ( -68 60 17 ) Floors/Floor247 [ 3.6739403974420594e-16 1 0 4 ] [ 0 0 -1 0 ] 90 1 1
}
// brush 9
{
( -68 116 -16 ) ( -68 116 -15 ) ( -68 115 -16 ) __TB_empty [ -1.8369701987210297e-16 -1 0 -12 ] [ 0 0 -1 0 ] 90 1 1
( -68 52 -16 ) ( -68 52 -15 ) ( -67 52 -16 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 270 1 1
( -68 116 -16 ) ( -68 115 -16 ) ( -67 116 -16 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ -1 1.8369701987210297e-16 0 -4 ] 270 1 1
( 60 -12 16 ) ( 61 -12 16 ) ( 60 -13 16 ) Floors/Floor242 [ -1.8369701987210297e-16 -1 0 -12 ] [ -1 1.8369701987210297e-16 0 -4 ] 90 1 1
( -68 68 -16 ) ( -67 68 -16 ) ( -68 68 -15 ) __TB_empty [ -1 1.8369701987210297e-16 0 -4 ] [ 0 0 -1 0 ] 0 1 1
( 60 -12 16 ) ( 60 -13 16 ) ( 60 -12 17 ) __TB_empty [ 1.8369701987210297e-16 1 0 12 ] [ 0 0 -1 0 ] 0 1 1
}
}
// entity 1
{
"classname" "actor_controlpad"
"origin" "-64 -48 28"
"angles" "0 0 0"
}
// entity 2
{
"classname" "actor_emitter_wall"
"origin" "-64 -4 20"
"angles" "0 180 0"
"script_path" "res://Resources/BulletScripts/Emitter_Trap_Single_Forward.tres"
"emit_on_start" "0"
}
// entity 3
{
"classname" "actor_emitter_wall"
"origin" "4 -56 20"
"angles" "0 -90 0"
"script_path" "res://Resources/BulletScripts/Emitter_Trap_Single_Forward.tres"
"emit_on_start" "1"
}
// entity 4
{
"classname" "actor_emitter_wall"
"origin" "56 60 20"
"angles" "0 0 0"
"script_path" "res://Resources/BulletScripts/Emitter_Trap_Single_Forward.tres"
"emit_on_start" "0"
}
// entity 5
{
"classname" "marker_spawn"
"origin" "-40 -40 22"
}

View file

@ -0,0 +1,14 @@
[remap]
importer="func_godot.map"
type="Resource"
uid="uid://onijl4hpep1u"
path="res://.godot/imported/Emitters.map-020561928e7c59c13a0548dc043fee46.tres"
[deps]
source_file="res://3D/Maps/Emitters.map"
dest_files=["res://.godot/imported/Emitters.map-020561928e7c59c13a0548dc043fee46.tres"]
[params]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,42 @@
[gd_scene load_steps=7 format=3 uid="uid://ctic4wsg3mibx"]
[ext_resource type="Script" uid="uid://qxh76ahgexqa" path="res://Scripts/Interactables/Switch3D.cs" id="1_lgsyu"]
[ext_resource type="Texture2D" uid="uid://d24g1qb40t72l" path="res://Sprites/Button_Small.png" id="2_t6fpe"]
[ext_resource type="AudioStream" uid="uid://bjvklk7qmlivd" path="res://SFX/288963__littlerobotsoundfactory__click_electronic_14.wav" id="3_jopg7"]
[ext_resource type="AudioStream" uid="uid://myr6n2c1u503" path="res://SFX/581602__samsterbirdies__beep-error.mp3" id="4_bbsqt"]
[ext_resource type="PackedScene" uid="uid://crxls5gk3wgin" path="res://3D/BlockbenchModels/Switch/Switch.gltf" id="5_lgsyu"]
[sub_resource type="SphereShape3D" id="SphereShape3D_itd0i"]
radius = 0.868968
[node name="Switch" type="Area3D" node_paths=PackedStringArray("Targets") groups=["Interactable"]]
collision_layer = 32
collision_mask = 0
script = ExtResource("1_lgsyu")
Targets = []
metadata/_edit_group_ = true
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 0, 0)
visible = false
pixel_size = 0.1
texture_filter = 0
texture = ExtResource("2_t6fpe")
hframes = 4
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_itd0i")
[node name="ActivationSound" type="AudioStreamPlayer3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15351868)
stream = ExtResource("3_jopg7")
bus = &"Effects"
[node name="DenySound" type="AudioStreamPlayer3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15351868)
stream = ExtResource("4_bbsqt")
bus = &"Effects"
[node name="blockbench_export2" parent="." instance=ExtResource("5_lgsyu")]
[editable path="blockbench_export2"]

View file

@ -0,0 +1,21 @@
[gd_resource type="Resource" script_class="FuncGodotFGDModelPointClass" load_steps=6 format=3 uid="uid://cuhhjj6kx74i0"]
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_8v8rk"]
[ext_resource type="Resource" uid="uid://kerywjgft7vh" path="res://3D/TrenchBroom/EntityDefinitions/base/target_base.tres" id="2_8wvoc"]
[ext_resource type="Resource" uid="uid://bd4h6ha84s74b" path="res://3D/TrenchBroom/EntityDefinitions/base/activation_type_base.tres" id="3_oqfhk"]
[ext_resource type="PackedScene" uid="uid://ctic4wsg3mibx" path="res://3D/Scenes/Props/Switch_3D.tscn" id="4_8v8rk"]
[ext_resource type="Script" uid="uid://ldfqjtq0br35" path="res://addons/func_godot/src/fgd/func_godot_fgd_model_point_class.gd" id="5_1s5ny"]
[resource]
script = ExtResource("5_1s5ny")
target_map_editor = 1
rotation_offset = Vector3(0, 180, 0)
scene_file = ExtResource("4_8v8rk")
apply_scale_on_map_build = false
classname = "actor_switch"
description = "Toggleable Switch"
base_classes = Array[Resource]([ExtResource("1_8v8rk"), ExtResource("2_8wvoc"), ExtResource("3_oqfhk")])
meta_properties = {
"model": "\"3D/MapModels/actor_controlpad.glb\"",
"size": AABB(-4, -4, -4, 4, 4, 4)
}

View file

@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=55 format=3 uid="uid://b700sa4be6dfa"] [gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=56 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="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
[ext_resource type="Script" uid="uid://drlmgulwbjwqu" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"] [ext_resource type="Script" uid="uid://drlmgulwbjwqu" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
@ -54,7 +54,8 @@
[ext_resource type="Resource" uid="uid://cmdgqpq5e1duq" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/marker_spawn.tres" id="51_mwau1"] [ext_resource type="Resource" uid="uid://cmdgqpq5e1duq" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/marker_spawn.tres" id="51_mwau1"]
[ext_resource type="Resource" uid="uid://cd8kf5wey5n8n" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/EnemySpawners/marker_spawn_enemy.tres" id="52_v4gel"] [ext_resource type="Resource" uid="uid://cd8kf5wey5n8n" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/EnemySpawners/marker_spawn_enemy.tres" id="52_v4gel"]
[ext_resource type="Resource" uid="uid://n7nb0h11j0nh" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/ItemSpawners/marker_spawn_item.tres" id="53_k53o0"] [ext_resource type="Resource" uid="uid://n7nb0h11j0nh" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/ItemSpawners/marker_spawn_item.tres" id="53_k53o0"]
[ext_resource type="Resource" uid="uid://cuhhjj6kx74i0" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_switch.tres" id="54_k53o0"]
[resource] [resource]
script = ExtResource("1_lykim") script = ExtResource("1_lykim")
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"), ExtResource("36_p5b6l"), ExtResource("37_53o7h"), ExtResource("38_mdgca"), ExtResource("39_d6b4f"), ExtResource("40_l3pck"), ExtResource("41_q8hab"), ExtResource("42_ekplg"), ExtResource("43_d7qk0"), ExtResource("44_k6g2u"), ExtResource("45_b4ckg"), ExtResource("46_dyoc0"), ExtResource("47_pa845"), ExtResource("48_lb3ub"), ExtResource("49_8hbdx"), ExtResource("50_xpy40"), ExtResource("51_mwau1"), ExtResource("52_v4gel"), ExtResource("53_k53o0")]) 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"), ExtResource("36_p5b6l"), ExtResource("37_53o7h"), ExtResource("38_mdgca"), ExtResource("39_d6b4f"), ExtResource("40_l3pck"), ExtResource("41_q8hab"), ExtResource("42_ekplg"), ExtResource("43_d7qk0"), ExtResource("44_k6g2u"), ExtResource("45_b4ckg"), ExtResource("46_dyoc0"), ExtResource("47_pa845"), ExtResource("48_lb3ub"), ExtResource("49_8hbdx"), ExtResource("50_xpy40"), ExtResource("51_mwau1"), ExtResource("52_v4gel"), ExtResource("53_k53o0"), ExtResource("54_k53o0")])

View file

@ -0,0 +1,8 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://cjqo8pqq48uo1"]
[ext_resource type="Texture2D" uid="uid://bovngtitpeme8" path="res://textures/Floors/Floor247.png" id="1_owdcy"]
[resource]
albedo_texture = ExtResource("1_owdcy")
metallic_specular = 0.0
texture_filter = 2

262
IsoTest/Emitters.tscn Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="BulletScript3D" load_steps=6 format=3 uid="uid://wvcda1h8wa2g"] [gd_resource type="Resource" script_class="BulletScript3D" load_steps=6 format=3 uid="uid://wvcda1h8wa2g"]
[ext_resource type="Resource" uid="uid://qrqsywgiij7i" path="res://Resources/Bullets/3D/simple_enemy_bullet_small_3D.tres" id="1_c4f5k"] [ext_resource type="Resource" uid="uid://dpnauedcubupa" path="res://Resources/Bullets/3D/rice_bullet_small_red_3D.tres" id="1_c4f5k"]
[ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="2_8cm4j"] [ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="2_8cm4j"]
[ext_resource type="Script" uid="uid://bxiprx5nwmpnu" path="res://Scripts/AttackPatterns/ShootingPattern3D.cs" id="3_l6rg6"] [ext_resource type="Script" uid="uid://bxiprx5nwmpnu" path="res://Scripts/AttackPatterns/ShootingPattern3D.cs" id="3_l6rg6"]
[ext_resource type="Script" uid="uid://w8hcpu68ssq" path="res://Scripts/Resources/BulletScripts/BulletScript3D.cs" id="4_or1wb"] [ext_resource type="Script" uid="uid://w8hcpu68ssq" path="res://Scripts/Resources/BulletScripts/BulletScript3D.cs" id="4_or1wb"]

View file

@ -0,0 +1,20 @@
[gd_resource type="Resource" script_class="BulletResource" load_steps=5 format=3 uid="uid://dv88os6arrybw"]
[ext_resource type="PackedScene" uid="uid://d28e1t2c0lwbp" path="res://Scenes/Weapons/base_enemy_bullet_3D.tscn" id="1_yu27h"]
[ext_resource type="Texture2D" uid="uid://dpa5feb03qfj0" path="res://Sprites/Bullets/missile_bullet.png" id="2_xelof"]
[ext_resource type="Script" uid="uid://dslyrfcej3g2n" path="res://Scripts/Resources/BulletResource.cs" id="3_fwref"]
[ext_resource type="Resource" uid="uid://bpreje4f8ok62" path="res://Resources/Bullets/3D/Explosion_3D.tres" id="3_mmbp2"]
[resource]
script = ExtResource("3_fwref")
BulletScene = ExtResource("1_yu27h")
BulletSprite = ExtResource("2_xelof")
BulletSize = 0.08
DestructionParticlesBullet = ExtResource("3_mmbp2")
BulletSpeed = 2.5
BulletDamage = 10.0
LifeTime = 20.0
Owner = 2
Attributes = 98
TimeModifiers = []
metadata/_custom_type_script = "uid://dslyrfcej3g2n"

View file

@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="DebugMapSelectData" load_steps=50 format=3 uid="uid://d1lc8lhq1b05p"] [gd_resource type="Resource" script_class="DebugMapSelectData" load_steps=52 format=3 uid="uid://d1lc8lhq1b05p"]
[ext_resource type="Script" uid="uid://durmwwyw3dnm6" path="res://Scripts/Resources/DebugMenu/DebugMapSelectData.cs" id="1_6kwth"] [ext_resource type="Script" uid="uid://durmwwyw3dnm6" path="res://Scripts/Resources/DebugMenu/DebugMapSelectData.cs" id="1_6kwth"]
[ext_resource type="Script" uid="uid://mja0rk7n2kln" path="res://Scripts/Resources/MapStartDataResource.cs" id="1_ov731"] [ext_resource type="Script" uid="uid://mja0rk7n2kln" path="res://Scripts/Resources/MapStartDataResource.cs" id="1_ov731"]
@ -16,6 +16,7 @@
[ext_resource type="Resource" uid="uid://b32mqmglcdo64" path="res://Resources/Maps/3D/Tutorial_3D.tres" id="13_vq1um"] [ext_resource type="Resource" uid="uid://b32mqmglcdo64" path="res://Resources/Maps/3D/Tutorial_3D.tres" id="13_vq1um"]
[ext_resource type="Resource" uid="uid://bxju78og0t8ca" path="res://Resources/Maps/3D/IsoMapTest3.tres" id="14_vq1um"] [ext_resource type="Resource" uid="uid://bxju78og0t8ca" path="res://Resources/Maps/3D/IsoMapTest3.tres" id="14_vq1um"]
[ext_resource type="Resource" uid="uid://bwg6xki3d8yow" path="res://Resources/Maps/3D/Factory4_Map.tres" id="15_hougo"] [ext_resource type="Resource" uid="uid://bwg6xki3d8yow" path="res://Resources/Maps/3D/Factory4_Map.tres" id="15_hougo"]
[ext_resource type="Resource" uid="uid://wmtqcotjkni1" path="res://Resources/Maps/3D/Emitters.tres" id="16_xhgge"]
[sub_resource type="Resource" id="Resource_qnbi6"] [sub_resource type="Resource" id="Resource_qnbi6"]
script = ExtResource("2_tnajf") script = ExtResource("2_tnajf")
@ -215,6 +216,12 @@ Map = ExtResource("15_hougo")
_name = "Factory 4" _name = "Factory 4"
metadata/_custom_type_script = "uid://dnthdjrx78u6m" metadata/_custom_type_script = "uid://dnthdjrx78u6m"
[sub_resource type="Resource" id="Resource_nhvm0"]
script = ExtResource("2_tnajf")
Map = ExtResource("16_xhgge")
_name = "Emitters Test"
metadata/_custom_type_script = "uid://dnthdjrx78u6m"
[resource] [resource]
script = ExtResource("1_6kwth") script = ExtResource("1_6kwth")
Maps = Array[Object]([SubResource("Resource_qnbi6"), SubResource("Resource_0k62o"), SubResource("Resource_edoov"), SubResource("Resource_47bot"), SubResource("Resource_mgdm6"), SubResource("Resource_v2as6"), SubResource("Resource_pein5"), SubResource("Resource_6wrc7"), SubResource("Resource_x3w7w"), SubResource("Resource_ajht5"), SubResource("Resource_7vmdn"), SubResource("Resource_6ijnv"), SubResource("Resource_bkci5"), SubResource("Resource_ognca"), SubResource("Resource_nbnej"), SubResource("Resource_w7lsm"), SubResource("Resource_vq1um"), SubResource("Resource_hougo"), SubResource("Resource_xhgge"), SubResource("Resource_gkp3t"), SubResource("Resource_c3ldk"), SubResource("Resource_rmbs0"), SubResource("Resource_uqr0b"), SubResource("Resource_3pxnb"), SubResource("Resource_57q5n")]) Maps = Array[Object]([SubResource("Resource_qnbi6"), SubResource("Resource_0k62o"), SubResource("Resource_edoov"), SubResource("Resource_47bot"), SubResource("Resource_mgdm6"), SubResource("Resource_v2as6"), SubResource("Resource_pein5"), SubResource("Resource_6wrc7"), SubResource("Resource_x3w7w"), SubResource("Resource_ajht5"), SubResource("Resource_7vmdn"), SubResource("Resource_6ijnv"), SubResource("Resource_bkci5"), SubResource("Resource_ognca"), SubResource("Resource_nbnej"), SubResource("Resource_w7lsm"), SubResource("Resource_vq1um"), SubResource("Resource_hougo"), SubResource("Resource_xhgge"), SubResource("Resource_gkp3t"), SubResource("Resource_c3ldk"), SubResource("Resource_rmbs0"), SubResource("Resource_uqr0b"), SubResource("Resource_3pxnb"), SubResource("Resource_57q5n"), SubResource("Resource_nhvm0")])

View file

@ -0,0 +1,16 @@
[gd_resource type="Resource" script_class="MapResource" load_steps=3 format=3 uid="uid://wmtqcotjkni1"]
[ext_resource type="Resource" uid="uid://cn8tu4jct04rp" path="res://Resources/StartData/Pistol_Start.tres" id="1_5nogw"]
[ext_resource type="Script" uid="uid://quy4d4tgvqfy" path="res://Scripts/Resources/MapResource.cs" id="2_6b5st"]
[resource]
script = ExtResource("2_6b5st")
MapId = &"Emitters"
MapName = &"Emitters Test"
MapDescription = null
ScenePath = &"res://IsoTest/Emitters.tscn"
NextMap = &"Factory4"
WeaponsAllowed = true
StartData = ExtResource("1_5nogw")
MapType = 1
metadata/_custom_type_script = "uid://quy4d4tgvqfy"

View file

@ -126,20 +126,36 @@ public partial class Bullet3D : Area3D, IBullet
private Vector3 MakeRotationFromDirection(Vector2 direction) private Vector3 MakeRotationFromDirection(Vector2 direction)
{ {
// Rotate input by -45 degrees to counter camera isometry // atan2 gives angle in radians around Z
float cos = Mathf.Cos(-Mathf.Pi / 4f); float zRotation2 = Mathf.Atan2(-direction.Y, direction.X) + Mathf.Pi;
float sin = Mathf.Sin(-Mathf.Pi / 4f);
Vector2 rotatedDir = new Vector2( // Apply correction for your sprite's local forward axis
direction.X * cos - direction.Y * sin, zRotation2 += Mathf.DegToRad(45f); // tweak to +45 or -45 as needed
direction.X * sin + direction.Y * cos
return new Vector3(
Mathf.DegToRad(-45f), // X tilt (to match camera)
Mathf.DegToRad(45f), // Y tilt (to match camera)
zRotation2 // Facing direction
); );
//float zRotation = Mathf.Atan2(rotatedDir.Y, rotatedDir.X)/* - Mathf.Pi / 2f*/; // var rotatedVector = direction.Rotated(Mathf.DegToRad(-45));
// var asrt = Vector2.ang
// return MakeRotationVectorRad(zRotation);
float zRotation = Mathf.Atan2(-rotatedDir.Y, rotatedDir.X) + Mathf.Pi; // Rotate input by -45 degrees to counter camera isometry
// float cos = Mathf.Cos(-Mathf.Pi / 4f);
return MakeRotationVectorRad(zRotation); // float sin = Mathf.Sin(-Mathf.Pi / 4f);
//
// Vector2 rotatedDir = new Vector2(
// direction.X * cos - direction.Y * sin,
// direction.X * sin + direction.Y * cos
// );
//
// //float zRotation = Mathf.Atan2(rotatedDir.Y, rotatedDir.X)/* - Mathf.Pi / 2f*/;
//
// float zRotation = Mathf.Atan2(-rotatedDir.Y, rotatedDir.X) + Mathf.Pi;
// var zRotationDegrees = Mathf.RadToDeg(zRotation);
// return MakeRotationVectorRad(zRotation);
} }
/// <summary> /// <summary>

BIN
Sprites/Bullets/missile_bullet.aseprite (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Sprites/Bullets/missile_bullet.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpa5feb03qfj0"
path="res://.godot/imported/missile_bullet.png-26a1d789a8f72e517b42c696ae4bfddf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Bullets/missile_bullet.png"
dest_files=["res://.godot/imported/missile_bullet.png-26a1d789a8f72e517b42c696ae4bfddf.ctex"]
[params]
compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

View file

@ -3,32 +3,39 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://iwbak4pr67rw" uid="uid://iwbak4pr67rw"
path="res://.godot/imported/rice_bullet_red_small.png-4d78fd04f57e8085ae0a0f3fb5784df2.ctex" path.s3tc="res://.godot/imported/rice_bullet_red_small.png-4d78fd04f57e8085ae0a0f3fb5784df2.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://Sprites/Bullets/rice_bullet_red_small.png" source_file="res://Sprites/Bullets/rice_bullet_red_small.png"
dest_files=["res://.godot/imported/rice_bullet_red_small.png-4d78fd04f57e8085ae0a0f3fb5784df2.ctex"] dest_files=["res://.godot/imported/rice_bullet_red_small.png-4d78fd04f57e8085ae0a0f3fb5784df2.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true process/fix_alpha_border=true
process/premult_alpha=false process/premult_alpha=false
process/normal_map_invert_y=false process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0