feat: implemented bullet impacts

This commit is contained in:
Sara 2025-07-19 12:33:40 +02:00
parent 7a5c129bb9
commit a7b3f97b3b
14 changed files with 644 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://da2nhu26lshix"
path="res://.godot/imported/bullet_impact_albedo.png-a285c5d1917287b07f88b5818370b861.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/effects/bullet_impact_albedo.png"
dest_files=["res://.godot/imported/bullet_impact_albedo.png-a285c5d1917287b07f88b5818370b861.ctex"]
[params]
compress/mode=0
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=false
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=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 MiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://duj1snmy7lk1l"
path="res://.godot/imported/bullet_impact_normal.png-5bf99cdbe81296319f4892ecad612d8f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/effects/bullet_impact_normal.png"
dest_files=["res://.godot/imported/bullet_impact_normal.png-5bf99cdbe81296319f4892ecad612d8f.ctex"]
[params]
compress/mode=0
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=false
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=1

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://me2saxnylpfa"]
[ext_resource type="Texture2D" uid="uid://da2nhu26lshix" path="res://assets/textures/effects/bullet_impact_albedo.png" id="1_dkdib"]
[ext_resource type="Texture2D" uid="uid://duj1snmy7lk1l" path="res://assets/textures/effects/bullet_impact_normal.png" id="2_drixv"]
[node name="BulletImpact" type="Node3D"]
[node name="Decal" type="Decal" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 0, 0)
size = Vector3(0.1, 0.1, 0.1)
texture_albedo = ExtResource("1_dkdib")
texture_normal = ExtResource("2_drixv")
cull_mask = 1047553

View file

@ -7,13 +7,20 @@ anim = NodePath("rifle/AnimationPlayer")
[node name="rifle" parent="." instance=ExtResource("1_afgyw")]
[node name="Body" parent="rifle/Character/Skeleton3D" index="0"]
layers = 2
[node name="mesh" parent="rifle/Character/Skeleton3D" index="1"]
layers = 2
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="rifle/Character/Skeleton3D" index="2"]
transform = Transform3D(1, -2.0932122e-15, 2.3524223e-18, 2.3525281e-18, 0.0022477505, 0.99999744, -2.0932126e-15, -0.9999974, 0.0022477508, 0.07988295, -0.13953947, -0.33976445)
bone_name = "root"
bone_idx = 39
[node name="RayCast3D" type="RayCast3D" parent="rifle/Character/Skeleton3D/BoneAttachment3D"]
transform = Transform3D(1, 0, -1.6543612e-24, 0, 1, 0, 4.135903e-25, 0, 1, 0, 0.00010576844, 0.047063388)
[node name="HitscanMuzzle" type="HitscanMuzzle" parent="rifle/Character/Skeleton3D/BoneAttachment3D"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 0.99999994, 0, 0, 0, 0.99999994, 2.746498e-26, 0, 0.059500493)
target_position = Vector3(0, 100, 0)
[node name="AnimationPlayer" parent="rifle" index="1"]

View file

@ -67,3 +67,8 @@ switch_weapon={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[layer_names]
3d_render/layer_1="Default"
3d_render/layer_2="FirstPerson"