From 2da082096467df35809a7ed80678032993ac5e1f Mon Sep 17 00:00:00 2001 From: teatov Date: Tue, 25 Feb 2025 00:27:47 +1000 Subject: [PATCH] add batrix model --- assets/models/characters/batrix.glb | 3 + assets/models/characters/batrix.glb.import | 52 ++++++ .../characters/batrix_bat_diffuse.png | 3 + .../characters/batrix_bat_diffuse.png.import | 36 ++++ assets/textures/characters/batrix_diffuse.png | 3 + .../characters/batrix_diffuse.png.import | 36 ++++ .../materials/characters/batrix_bat_mat.tres | 6 + .../materials/characters/batrix_mat.tres | 6 + scenes/player.tscn | 166 ++++++++++++++++-- scenes/test.tscn | 2 +- scripts/player/player_attack.gd | 1 + 11 files changed, 298 insertions(+), 16 deletions(-) create mode 100644 assets/models/characters/batrix.glb create mode 100644 assets/models/characters/batrix.glb.import create mode 100644 assets/textures/characters/batrix_bat_diffuse.png create mode 100644 assets/textures/characters/batrix_bat_diffuse.png.import create mode 100644 assets/textures/characters/batrix_diffuse.png create mode 100644 assets/textures/characters/batrix_diffuse.png.import create mode 100644 resources/materials/characters/batrix_bat_mat.tres create mode 100644 resources/materials/characters/batrix_mat.tres diff --git a/assets/models/characters/batrix.glb b/assets/models/characters/batrix.glb new file mode 100644 index 0000000..8a6b19d --- /dev/null +++ b/assets/models/characters/batrix.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46e095fc27416a1850c32e8fd07ede7e0147e92a010e9e077af5a459b9944770 +size 321956 diff --git a/assets/models/characters/batrix.glb.import b/assets/models/characters/batrix.glb.import new file mode 100644 index 0000000..783473d --- /dev/null +++ b/assets/models/characters/batrix.glb.import @@ -0,0 +1,52 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://h7nclbup16w3" +path="res://.godot/imported/batrix.glb-2a26ce30df79829d9ecd076dc9b45214.scn" + +[deps] + +source_file="res://assets/models/characters/batrix.glb" +dest_files=["res://.godot/imported/batrix.glb-2a26ce30df79829d9ecd076dc9b45214.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="Model" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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=true +import_script/path="" +_subresources={ +"materials": { +"batrix_bat_mat": { +"use_external/enabled": true, +"use_external/path": "res://resources/materials/characters/batrix_bat_mat.tres" +}, +"batrix_mat": { +"use_external/enabled": true, +"use_external/path": "res://resources/materials/characters/batrix_mat.tres" +} +}, +"nodes": { +"PATH:Armature/Skeleton3D": { +"rest_pose/external_animation_library": null +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/assets/textures/characters/batrix_bat_diffuse.png b/assets/textures/characters/batrix_bat_diffuse.png new file mode 100644 index 0000000..396f21c --- /dev/null +++ b/assets/textures/characters/batrix_bat_diffuse.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4f2671fea688cbd4a4a46b44e7f3bccf570e5cbf6605e7d6bf103e7b5123a80 +size 83285 diff --git a/assets/textures/characters/batrix_bat_diffuse.png.import b/assets/textures/characters/batrix_bat_diffuse.png.import new file mode 100644 index 0000000..72fd9c1 --- /dev/null +++ b/assets/textures/characters/batrix_bat_diffuse.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://fj76wlr61buq" +path.s3tc="res://.godot/imported/batrix_bat_diffuse.png-6d058ed86a54fd6c4f224aa564fe2167.s3tc.ctex" +path.etc2="res://.godot/imported/batrix_bat_diffuse.png-6d058ed86a54fd6c4f224aa564fe2167.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://assets/textures/characters/batrix_bat_diffuse.png" +dest_files=["res://.godot/imported/batrix_bat_diffuse.png-6d058ed86a54fd6c4f224aa564fe2167.s3tc.ctex", "res://.godot/imported/batrix_bat_diffuse.png-6d058ed86a54fd6c4f224aa564fe2167.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/textures/characters/batrix_diffuse.png b/assets/textures/characters/batrix_diffuse.png new file mode 100644 index 0000000..f81f208 --- /dev/null +++ b/assets/textures/characters/batrix_diffuse.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7f6141a476cc1eedec868af5a22ce4e05f4620b104c1fafa659b2131271462e +size 1294148 diff --git a/assets/textures/characters/batrix_diffuse.png.import b/assets/textures/characters/batrix_diffuse.png.import new file mode 100644 index 0000000..3e19cbf --- /dev/null +++ b/assets/textures/characters/batrix_diffuse.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cv5cnlgxx3rud" +path.s3tc="res://.godot/imported/batrix_diffuse.png-4b5b24ac37680cf2859dd211837de1a2.s3tc.ctex" +path.etc2="res://.godot/imported/batrix_diffuse.png-4b5b24ac37680cf2859dd211837de1a2.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://assets/textures/characters/batrix_diffuse.png" +dest_files=["res://.godot/imported/batrix_diffuse.png-4b5b24ac37680cf2859dd211837de1a2.s3tc.ctex", "res://.godot/imported/batrix_diffuse.png-4b5b24ac37680cf2859dd211837de1a2.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/resources/materials/characters/batrix_bat_mat.tres b/resources/materials/characters/batrix_bat_mat.tres new file mode 100644 index 0000000..d2e7a51 --- /dev/null +++ b/resources/materials/characters/batrix_bat_mat.tres @@ -0,0 +1,6 @@ +[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://bq6dojq8d7rk0"] + +[ext_resource type="Texture2D" uid="uid://fj76wlr61buq" path="res://assets/textures/characters/batrix_bat_diffuse.png" id="1_p4uo6"] + +[resource] +albedo_texture = ExtResource("1_p4uo6") diff --git a/resources/materials/characters/batrix_mat.tres b/resources/materials/characters/batrix_mat.tres new file mode 100644 index 0000000..6fe10ac --- /dev/null +++ b/resources/materials/characters/batrix_mat.tres @@ -0,0 +1,6 @@ +[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://dvr5ptylromau"] + +[ext_resource type="Texture2D" uid="uid://cv5cnlgxx3rud" path="res://assets/textures/characters/batrix_diffuse.png" id="1_8x1pe"] + +[resource] +albedo_texture = ExtResource("1_8x1pe") diff --git a/scenes/player.tscn b/scenes/player.tscn index 84c56ae..105fd61 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -1,19 +1,14 @@ -[gd_scene load_steps=11 format=3 uid="uid://b73y71y3efmv"] +[gd_scene load_steps=10 format=3 uid="uid://b73y71y3efmv"] [ext_resource type="Script" path="res://scripts/player/player.gd" id="1_xt3i8"] [ext_resource type="Material" uid="uid://cc18ee0wbfoud" path="res://resources/materials/debug/debug_player.tres" id="2_0p422"] +[ext_resource type="PackedScene" uid="uid://h7nclbup16w3" path="res://assets/models/characters/batrix.glb" id="3_7s4q6"] [ext_resource type="Script" path="res://scripts/player/player_attack.gd" id="3_8pbtx"] [ext_resource type="Material" uid="uid://bdi02rpvdukem" path="res://resources/materials/debug/debug_attack.tres" id="4_ll2ct"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_apl1i"] height = 1.8 -[sub_resource type="CapsuleMesh" id="CapsuleMesh_dtg5r"] -height = 1.8 - -[sub_resource type="BoxMesh" id="BoxMesh_fdktb"] -size = Vector3(0.5, 0.5, 0.5) - [sub_resource type="CylinderShape3D" id="CylinderShape3D_qsqht"] height = 0.43 radius = 2.0 @@ -31,18 +26,156 @@ collision_layer = 16 script = ExtResource("1_xt3i8") _collision_debug_material = ExtResource("2_0p422") +[node name="Model" parent="." instance=ExtResource("3_7s4q6")] + +[node name="Skeleton3D" parent="Model/Armature" index="0"] +bones/0/rotation = Quaternion(0.500003, -0.499997, -0.499997, 0.500003) +bones/1/rotation = Quaternion(-0.500006, 0.5, 0.499994, 0.5) +bones/6/rotation = Quaternion(-0.0323581, 2.46001e-07, 8.00608e-09, 0.999476) +bones/7/rotation = Quaternion(0.123965, -2.40098e-07, -2.92456e-09, 0.992287) +bones/7/scale = Vector3(1, 1, 1) +bones/8/rotation = Quaternion(-0.0917916, -2.67583e-15, 2.18848e-08, 0.995778) +bones/9/rotation = Quaternion(1.15202e-07, 0.707107, 0.707107, -5.33851e-08) +bones/9/scale = Vector3(1, 1, 1) +bones/12/rotation = Quaternion(-1.03251e-07, -3.17865e-08, 3.28198e-15, 1) +bones/13/rotation = Quaternion(-1.37668e-07, -3.17865e-08, 4.37597e-15, 1) +bones/14/rotation = Quaternion(-1.03251e-07, -3.17865e-08, 3.28198e-15, 1) +bones/18/rotation = Quaternion(-1.37668e-07, -3.17865e-08, 4.37597e-15, 1) +bones/20/rotation = Quaternion(0.19747, 0.678974, 0.678974, -0.19747) +bones/20/scale = Vector3(1, 1, 1) +bones/30/rotation = Quaternion(-6.21725e-15, -5.94129e-08, -1.49012e-07, 1) +bones/36/rotation = Quaternion(0.19747, 0.678974, 0.678974, -0.19747) +bones/36/scale = Vector3(1, 1, 1) +bones/40/rotation = Quaternion(-0.19747, 0.678974, 0.678974, 0.19747) +bones/40/scale = Vector3(1, 1, 1) +bones/44/rotation = Quaternion(4.66323e-07, -0.535908, 0.844276, -1.6823e-07) +bones/44/scale = Vector3(1, 1, 1) +bones/45/rotation = Quaternion(-0.0181733, 2.38379e-07, 1.14098e-08, 0.999835) +bones/46/rotation = Quaternion(-1.20807e-07, 0.993087, -0.117383, 7.85287e-07) +bones/48/rotation = Quaternion(-0.034235, -3.57418e-07, 8.86969e-08, 0.999414) +bones/50/rotation = Quaternion(0.403888, -2.98082e-07, -3.85178e-07, 0.914808) +bones/50/scale = Vector3(1, 1, 1) +bones/51/rotation = Quaternion(-0.512846, 3.82068e-07, 4.27952e-07, 0.858481) +bones/51/scale = Vector3(1, 1, 1) +bones/52/rotation = Quaternion(0.0772044, -1.03801e-06, -1.2885e-07, 0.997015) +bones/52/scale = Vector3(1, 1, 1) +bones/55/rotation = Quaternion(0.000780555, -0.0237052, 0.0502717, 0.998454) +bones/55/scale = Vector3(1, 1, 1) +bones/56/scale = Vector3(1, 1, 1) +bones/58/rotation = Quaternion(0.00161688, 2.38418e-07, 1.03441e-09, 0.999999) +bones/58/scale = Vector3(1, 1, 1) +bones/59/rotation = Quaternion(0.228541, 0.947226, 0.209053, -0.0826344) +bones/60/rotation = Quaternion(0.133438, -0.0949905, -0.147138, 0.97546) +bones/61/rotation = Quaternion(0.0362919, -0.00490006, -0.0475428, 0.998198) +bones/63/rotation = Quaternion(-0.497004, -0.574613, 0.266856, 0.592954) +bones/64/rotation = Quaternion(-0.0266082, 0.706555, -0.0266833, 0.706654) +bones/65/rotation = Quaternion(-8.29555e-05, 9.48293e-05, 0.0141926, 0.999899) +bones/65/scale = Vector3(1, 1, 1) +bones/66/rotation = Quaternion(2.73443e-05, -2.92389e-05, 0.0202266, 0.999795) +bones/66/scale = Vector3(1, 1, 1) +bones/69/rotation = Quaternion(-0.706943, -0.0143225, 0.0142829, 0.706981) +bones/70/rotation = Quaternion(-0.706726, -0.024286, 0.0243834, 0.70665) +bones/72/rotation = Quaternion(-7.74054e-05, 9.75834e-05, -0.00343725, 0.999994) +bones/72/scale = Vector3(1, 1, 1) +bones/73/rotation = Quaternion(2.5122e-05, -2.6431e-05, 0.00184074, 0.999998) +bones/73/scale = Vector3(1, 1, 1) +bones/76/rotation = Quaternion(-0.707088, -0.00131944, 0.00128381, 0.707123) +bones/77/rotation = Quaternion(-0.707143, 0.0011801, -0.00107765, 0.707069) +bones/78/rotation = Quaternion(0.0361992, 0.706123, 0.0361283, 0.70624) +bones/80/rotation = Quaternion(-8.66251e-06, 9.56188e-06, -0.0155723, 0.999879) +bones/83/rotation = Quaternion(-0.707027, 0.0110055, -0.0109902, 0.707015) +bones/84/rotation = Quaternion(-0.706096, 0.0385178, -0.038402, 0.706024) +bones/85/rotation = Quaternion(0.0569009, 0.704803, 0.0568902, 0.704825) +bones/85/scale = Vector3(1, 1, 1) +bones/86/rotation = Quaternion(-7.06026e-06, 1.40335e-05, -0.0424302, 0.999099) +bones/87/rotation = Quaternion(-1.06996e-07, 1.17384e-07, -0.0413655, 0.999144) +bones/89/rotation = Quaternion(-0.707107, 8.47153e-07, 9.00539e-07, 0.707107) +bones/90/rotation = Quaternion(-0.706502, 0.0292507, -0.0292488, 0.706501) +bones/91/rotation = Quaternion(-0.70463, 0.0592111, -0.0591898, 0.704619) +bones/92/rotation = Quaternion(-0.708275, 5.03263e-14, -2.84259e-07, 0.705936) +bones/93/rotation = Quaternion(-0.705843, -3.79543e-06, -5.06699e-05, 0.708368) +bones/96/rotation = Quaternion(-0.704198, -0.0522797, 0.0188281, 0.707826) +bones/97/rotation = Quaternion(0.0365982, -0.0425263, 0.740578, 0.669624) +bones/97/scale = Vector3(1, 1, 1) +bones/98/rotation = Quaternion(0.000780569, 0.0237052, -0.0502716, 0.998454) +bones/98/scale = Vector3(1, 1, 1) +bones/99/rotation = Quaternion(0.00234516, 3.8331e-05, 3.29257e-05, 0.999997) +bones/99/scale = Vector3(1, 1, 1) +bones/101/rotation = Quaternion(0.00161688, -2.38418e-07, -1.03441e-09, 0.999999) +bones/101/scale = Vector3(1, 1, 1) +bones/103/rotation = Quaternion(0.133438, 0.0949905, 0.147138, 0.97546) +bones/104/rotation = Quaternion(0.0362919, 0.00490006, 0.0475427, 0.998198) +bones/105/rotation = Quaternion(-0.467553, 0.526138, -0.458035, 0.542933) +bones/106/rotation = Quaternion(-0.497004, 0.574613, -0.266856, 0.592954) +bones/107/rotation = Quaternion(-0.0266082, -0.706555, 0.0266833, 0.706654) +bones/108/rotation = Quaternion(-8.29556e-05, -9.48397e-05, -0.0141926, 0.999899) +bones/108/scale = Vector3(1, 1, 1) +bones/109/scale = Vector3(1, 1, 1) +bones/111/rotation = Quaternion(-0.707107, -8.48703e-07, -8.9898e-07, 0.707107) +bones/112/rotation = Quaternion(-0.706943, 0.0143225, -0.0142829, 0.706981) +bones/115/rotation = Quaternion(-7.74053e-05, -9.75928e-05, 0.00343725, 0.999994) +bones/115/scale = Vector3(1, 1, 1) +bones/116/rotation = Quaternion(2.5122e-05, 2.64312e-05, -0.00184074, 0.999998) +bones/116/scale = Vector3(1, 1, 1) +bones/118/rotation = Quaternion(-0.707107, -8.47159e-07, -9.00524e-07, 0.707107) +bones/119/rotation = Quaternion(-0.707088, 0.00131944, -0.00128381, 0.707123) +bones/120/rotation = Quaternion(-0.707143, -0.00118011, 0.00107765, 0.707069) +bones/121/rotation = Quaternion(0.0361992, -0.706123, -0.0361283, 0.70624) +bones/122/scale = Vector3(1, 1, 1) +bones/125/rotation = Quaternion(-0.707107, -8.47681e-07, -9.00015e-07, 0.707107) +bones/126/rotation = Quaternion(-0.707027, -0.0110055, 0.0109902, 0.707015) +bones/127/rotation = Quaternion(-0.706096, -0.0385178, 0.038402, 0.706024) +bones/128/rotation = Quaternion(0.0569009, -0.704803, -0.0568902, 0.704825) +bones/128/scale = Vector3(1, 1, 1) +bones/130/rotation = Quaternion(-1.06334e-07, -1.19982e-07, 0.0413655, 0.999144) +bones/132/rotation = Quaternion(-0.707107, -8.49787e-07, -8.97905e-07, 0.707107) +bones/133/rotation = Quaternion(-0.706502, -0.0292508, 0.0292488, 0.706501) +bones/134/rotation = Quaternion(-0.70463, -0.0592111, 0.0591898, 0.704619) +bones/139/rotation = Quaternion(-0.704198, 0.0522797, -0.018828, 0.707826) +bones/140/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47963e-09, 0.999476) +bones/141/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47954e-09, 0.999476) +bones/142/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47955e-09, 0.999476) +bones/143/rotation = Quaternion(0.0323581, -3.23524e-09, 4.47962e-09, 0.999476) +bones/144/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/145/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/146/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/147/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/148/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/149/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/150/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/151/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99411e-11, 0.999476) +bones/152/rotation = Quaternion(0.032358, -3.08697e-09, -9.99404e-11, 0.999476) +bones/153/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99409e-11, 0.999476) +bones/154/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/155/rotation = Quaternion(0.0323581, -3.08697e-09, -9.99408e-11, 0.999476) +bones/156/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81471e-09, 0.999476) +bones/157/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/158/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/159/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/160/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/161/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/162/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/163/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81471e-09, 0.999476) +bones/164/rotation = Quaternion(0.032358, -2.41381e-07, -7.81469e-09, 0.999476) +bones/165/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81471e-09, 0.999476) +bones/166/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/167/rotation = Quaternion(0.0323581, -2.41381e-07, -7.81472e-09, 0.999476) +bones/168/rotation = Quaternion(0.999437, 1.66876e-08, 3.38767e-07, -0.0335376) +bones/168/scale = Vector3(1, 1, 1.00001) +bones/169/rotation = Quaternion(0.0296713, -1.19064e-07, 1.37491e-08, 0.99956) +bones/173/rotation = Quaternion(-0.730424, -1.13568e-07, -2.27149e-07, 0.682994) +bones/174/rotation = Quaternion(0.999437, 3.26797e-08, -1.37802e-07, -0.0335376) +bones/174/scale = Vector3(1, 1, 1.00001) +bones/175/rotation = Quaternion(0.0296713, 1.1925e-07, -7.47368e-09, 0.99956) +bones/179/rotation = Quaternion(-0.730424, 1.08982e-07, 2.31437e-07, 0.682994) + +[node name="AnimationPlayer" parent="Model" index="1"] +autoplay = "+idle" + [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0) shape = SubResource("CylinderShape3D_apl1i") -[node name="MeshInstance3D" type="MeshInstance3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0) -mesh = SubResource("CapsuleMesh_dtg5r") - -[node name="MeshInstance3D2" type="MeshInstance3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.17779, 0.357218) -mesh = SubResource("BoxMesh_fdktb") - [node name="AttackArea" type="Area3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) collision_layer = 32 @@ -55,5 +188,8 @@ shape = SubResource("CylinderShape3D_qsqht") [node name="SwoopMesh" type="MeshInstance3D" parent="AttackArea"] transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -0.0985078, 0, 1, -4.30591e-09, 0, 0, 0) +visible = false material_override = SubResource("StandardMaterial3D_m1xj5") mesh = SubResource("SphereMesh_kqbjh") + +[editable path="Model"] diff --git a/scenes/test.tscn b/scenes/test.tscn index 625b376..17e5565 100644 --- a/scenes/test.tscn +++ b/scenes/test.tscn @@ -39,8 +39,8 @@ process_physics_priority = 100 transform = Transform3D(0.866025, -0.321394, 0.383022, 0, 0.766044, 0.642788, -0.5, -0.55667, 0.663414, 4.894, 6.43, 6.963) current = true fov = 20.0 -near = 35.0 script = ExtResource("3_f4hhh") +_distance = 30.0 [node name="ProjectileSpawner" parent="." instance=ExtResource("4_84n74")] transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 9.97514, 0, -7.30423) diff --git a/scripts/player/player_attack.gd b/scripts/player/player_attack.gd index 5e9ba7c..ef85f75 100644 --- a/scripts/player/player_attack.gd +++ b/scripts/player/player_attack.gd @@ -36,6 +36,7 @@ func _process(delta: float) -> void: (_swoop_mesh.material_override as StandardMaterial3D).albedo_color = Color( 1, 1, 1, _swoop_effect_timer / SWOOP_EFFECT_TIME ) + _swoop_mesh.visible = _swoop_effect_timer > 0 func _physics_process(_delta: float) -> void: