forked from unfa/liblast
Tweaked shell casing ejection, sound and collision
parent
2fc6db760e
commit
23e7b0c8aa
File diff suppressed because one or more lines are too long
BIN
Asset Sources/Weapons/Handgun/Handgun.blend (Stored with Git LFS)
BIN
Asset Sources/Weapons/Handgun/Handgun.blend (Stored with Git LFS)
Binary file not shown.
|
@ -75,6 +75,7 @@ anim_offset_max = 100.0
|
|||
collision_friction = 1.0
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
disable_mode = 2
|
||||
collision_layer = 2
|
||||
collision_mask = 7
|
||||
script = ExtResource( "1" )
|
||||
|
@ -175,5 +176,4 @@ unit_db = -24.0
|
|||
unit_size = 4.0
|
||||
max_db = -12.0
|
||||
pitch_scale = 3.0
|
||||
out_of_range_mode = 1
|
||||
script = null
|
||||
|
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://cgq2obcapwiqd"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing.wav-2f1fcaf2cfe6f12ad4d90cbed8c811fd.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing.wav-2f1fcaf2cfe6f12ad4d90cbed8c811fd.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_01.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_01.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://buq0agqfsnt5t"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing_01.wav-80f393f0b224823a59ba1d5e69dc8cdd.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing_01.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing_01.wav-80f393f0b224823a59ba1d5e69dc8cdd.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_02.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_02.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://bnrhfe8l0u6sf"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing_02.wav-112b51cd8cb7ed5e8b03e0f5b54433be.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing_02.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing_02.wav-112b51cd8cb7ed5e8b03e0f5b54433be.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_03.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_03.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://cmhkw2vucxhla"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing_03.wav-b449dea62a64cf4c068dbe8cd1ecb21b.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing_03.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing_03.wav-b449dea62a64cf4c068dbe8cd1ecb21b.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_04.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_04.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://cn00q0wglke4s"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing_04.wav-095833c35c48abb6a093228813242b12.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing_04.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing_04.wav-095833c35c48abb6a093228813242b12.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_05.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_05.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://bkshpp8eu0afl"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing_05.wav-e7bb9251bc172a625c17724b78545468.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing_05.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing_05.wav-e7bb9251bc172a625c17724b78545468.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_06.wav (Stored with Git LFS)
BIN
Game/Assets/SFX/Weapons_Handgun_Casing_06.wav (Stored with Git LFS)
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
uid="uid://bd448ofmkoi50"
|
||||
path="res://.godot/imported/Weapons_Handgun_Casing_06.wav-fce34a1d70c536d8f363aa9d894e9b04.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/SFX/Weapons_Handgun_Casing_06.wav"
|
||||
dest_files=["res://.godot/imported/Weapons_Handgun_Casing_06.wav-fce34a1d70c536d8f363aa9d894e9b04.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
|
@ -1,12 +1,13 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dfwe3bvh8lbbp"]
|
||||
[gd_scene load_steps=24 format=3 uid="uid://dfwe3bvh8lbbp"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b6aa41e8u5cxi" path="res://Assets/Weapons/Handgun/Casing.gltf" id="1"]
|
||||
[ext_resource type="Script" path="res://Assets/Weapons/Handgun/Casing.gd" id="1_kwgjj"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5cwnfuw4go1b" path="res://Assets/Audio/SoundPlayer.tscn" id="3_47hc3"]
|
||||
[ext_resource type="Texture2D" uid="uid://cguy76rs8e220" path="res://Assets/Effects/Flame.png" id="4_p6m1d"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="2"]
|
||||
radius = 0.0119513
|
||||
height = 0.0560047
|
||||
radius = 0.079499
|
||||
height = 0.179472
|
||||
|
||||
[sub_resource type="Animation" id="Animation_euct2"]
|
||||
resource_name = "Fade"
|
||||
|
@ -137,6 +138,93 @@ tracks/4/keys = {
|
|||
"values": [1]
|
||||
}
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_hmrjy"]
|
||||
offsets = PackedFloat32Array(0, 0.13587, 0.875, 1)
|
||||
colors = PackedColorArray(0.211765, 0.211765, 0.211765, 0, 1, 1, 1, 1, 0.139394, 0.139394, 0.139394, 0.139394, 0, 0, 0, 0)
|
||||
|
||||
[sub_resource type="GradientTexture" id="GradientTexture_cx0o7"]
|
||||
gradient = SubResource( "Gradient_hmrjy" )
|
||||
|
||||
[sub_resource type="Curve" id="Curve_40r7q"]
|
||||
_data = [Vector2(0, 0), 0.0, 6.27273, 0, 0, Vector2(0.207729, 0.618182), 0.812603, 0.812603, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_rxn7d"]
|
||||
curve = SubResource( "Curve_40r7q" )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id="ParticlesMaterial_bb1vw"]
|
||||
gravity = Vector3(0, 0, 0)
|
||||
damping_min = 2.3
|
||||
damping_max = 3.24
|
||||
angle_min = -541.3
|
||||
angle_max = 705.1
|
||||
scale_min = 0.1
|
||||
scale_max = 0.12
|
||||
scale_curve = SubResource( "CurveTexture_rxn7d" )
|
||||
color = Color(0.0509804, 0.0509804, 0.0509804, 1)
|
||||
color_ramp = SubResource( "GradientTexture_cx0o7" )
|
||||
anim_offset_max = 4.0
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0c0hx"]
|
||||
blend_mode = 1
|
||||
specular_mode = 4
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_color = Color(1, 1, 1, 0.0352941)
|
||||
albedo_texture = ExtResource( "4_p6m1d" )
|
||||
backlight_enabled = true
|
||||
backlight = Color(1, 1, 1, 1)
|
||||
disable_receive_shadows = true
|
||||
billboard_mode = 3
|
||||
particles_anim_h_frames = 2
|
||||
particles_anim_v_frames = 2
|
||||
particles_anim_loop = false
|
||||
proximity_fade_enable = true
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_24v16"]
|
||||
material = SubResource( "StandardMaterial3D_0c0hx" )
|
||||
|
||||
[sub_resource type="TubeTrailMesh" id="TubeTrailMesh_syvhj"]
|
||||
radius = 0.106
|
||||
sections = 10
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bhh7n"]
|
||||
use_particle_trails = true
|
||||
|
||||
[sub_resource type="RibbonTrailMesh" id="RibbonTrailMesh_dh8q5"]
|
||||
material = SubResource( "StandardMaterial3D_bhh7n" )
|
||||
size = 0.175
|
||||
sections = 15
|
||||
section_length = 1.25
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id="ParticlesMaterial_vkp8p"]
|
||||
particle_flag_rotate_y = true
|
||||
gravity = Vector3(0, 0, 0)
|
||||
angular_velocity_min = -2.85
|
||||
angular_velocity_max = -2.85
|
||||
angle_min = -157.2
|
||||
angle_max = 571.3
|
||||
|
||||
[sub_resource type="Curve" id="Curve_dd5oo"]
|
||||
_data = [Vector2(0, 0.327273), 0.0, 0.0, 0, 0, Vector2(1, 0.981818), 0.0929754, 0.0, 0, 0]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_585vn"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture" id="GradientTexture_oxmwq"]
|
||||
gradient = SubResource( "Gradient_585vn" )
|
||||
width = 128
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_58gkl"]
|
||||
transparency = 4
|
||||
albedo_color = Color(0.847059, 0.886275, 0.858824, 0.513726)
|
||||
albedo_texture = SubResource( "GradientTexture_oxmwq" )
|
||||
|
||||
[sub_resource type="RibbonTrailMesh" id="RibbonTrailMesh_fl8aq"]
|
||||
material = SubResource( "StandardMaterial3D_58gkl" )
|
||||
size = 0.201
|
||||
sections = 12
|
||||
section_length = 0.239
|
||||
curve = SubResource( "Curve_dd5oo" )
|
||||
|
||||
[node name="Casing" type="RigidDynamicBody3D"]
|
||||
transform = Transform3D(0.998201, 0, 0, 0, 0.998201, 0, 0, 0, 0.998201, 0, 0, 0)
|
||||
collision_layer = 8
|
||||
|
@ -144,15 +232,25 @@ collision_mask = 15
|
|||
continuous_cd = true
|
||||
contacts_reported = 1
|
||||
contact_monitor = true
|
||||
linear_damp = 0.032
|
||||
angular_velocity = Vector3(-20, 40, 0)
|
||||
angular_damp = 0.392
|
||||
script = ExtResource( "1_kwgjj" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1.91069e-15, 4.37114e-08, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, -4.37114e-08, 0, 0, 0)
|
||||
transform = Transform3D(-4.37114e-08, -1, 1.06774e-14, 1, -4.37114e-08, 0, 4.03066e-21, 1.06774e-14, 1, 0, 0, 0)
|
||||
visible = false
|
||||
shape = SubResource( "2" )
|
||||
disabled = true
|
||||
script = null
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, -1, 1.06774e-14, 1, -4.37114e-08, 0, 4.03066e-21, 1.06774e-14, 1, 0, 0, 0)
|
||||
shape = SubResource( "2" )
|
||||
script = null
|
||||
|
||||
[node name="Casing" parent="." instance=ExtResource( "1" )]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
|
||||
transform = Transform3D(1, 0, 1.06774e-14, 0, 1, 0, -1.06774e-14, 0, 1, 0, 0, 0)
|
||||
|
||||
[node name="Casing_LOD0" parent="Casing" index="0"]
|
||||
gi_mode = 2
|
||||
|
@ -182,6 +280,50 @@ anims/RESET = SubResource( "Animation_u4pct" )
|
|||
blend_times = []
|
||||
script = null
|
||||
|
||||
[node name="Smoke" type="GPUParticles3D" parent="."]
|
||||
visible = false
|
||||
emitting = false
|
||||
amount = 256
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
explosiveness = 0.59
|
||||
local_coords = false
|
||||
trail_length_secs = 2.0
|
||||
process_material = SubResource( "ParticlesMaterial_bb1vw" )
|
||||
draw_pass_1 = SubResource( "QuadMesh_24v16" )
|
||||
script = null
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
top_level = true
|
||||
visible = false
|
||||
mesh = SubResource( "TubeTrailMesh_syvhj" )
|
||||
skeleton = NodePath("../SmokeTrail")
|
||||
surface_material_override/0 = null
|
||||
script = null
|
||||
|
||||
[node name="SmokeTrail" type="GPUParticles3D" parent="."]
|
||||
visible = false
|
||||
emitting = false
|
||||
amount = 5
|
||||
lifetime = 2.0
|
||||
one_shot = true
|
||||
local_coords = false
|
||||
trail_enabled = true
|
||||
trail_length_secs = 2.0
|
||||
process_material = SubResource( "ParticlesMaterial_bb1vw" )
|
||||
draw_pass_1 = SubResource( "RibbonTrailMesh_dh8q5" )
|
||||
script = null
|
||||
|
||||
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
|
||||
visible = false
|
||||
emitting = false
|
||||
one_shot = true
|
||||
local_coords = false
|
||||
trail_length_secs = 0.01
|
||||
process_material = SubResource( "ParticlesMaterial_vkp8p" )
|
||||
draw_pass_1 = SubResource( "RibbonTrailMesh_fl8aq" )
|
||||
script = null
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Casing_body_entered"]
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
{
|
||||
"name" : "Ejector",
|
||||
"rotation" : [
|
||||
-0.326229989528656,
|
||||
-0.6273548603057861,
|
||||
0.22460637986660004,
|
||||
0.670486330986023
|
||||
-0.2487308830022812,
|
||||
-0.4064317047595978,
|
||||
0.30651983618736267,
|
||||
0.8240095973014832
|
||||
],
|
||||
"translation" : [
|
||||
-0.0309455506503582,
|
||||
|
|
|
@ -88,8 +88,10 @@ func trigger(index: int, active: bool) -> void:
|
|||
|
||||
get_tree().root.add_child(casing_instance)
|
||||
|
||||
casing_instance.global_transform = ejector.global_transform.translated(player.linear_velocity / 30) #approximating delta
|
||||
casing_instance.linear_velocity = ejector.global_transform.basis[1] * randf_range(6.2, 8.5)# - ejector.global_transform.basis[2] * randf_range(-1.2, -1.7) + player.linear_velocity
|
||||
casing_instance.global_transform = ejector.global_transform.translated(player.linear_velocity / 60) #approximating delta
|
||||
casing_instance.linear_velocity = ejector.global_transform.basis[1] * randf_range(3.2, 4.5) + (player.linear_velocity / 2)
|
||||
casing_instance.angular_velocity.y += randf_range(-10, 10)
|
||||
casing_instance.angular_velocity.x += randf_range(-10, 10)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
|
|
@ -34,6 +34,9 @@ script = ExtResource( "2" )
|
|||
|
||||
[node name="Handgun" parent="." instance=ExtResource( "1" )]
|
||||
|
||||
[node name="Ejector" parent="Handgun" index="1"]
|
||||
transform = Transform3D(0.111956, -0.239423, -0.964439, 0.710515, 0.697806, -0.0907515, 0.694719, -0.675088, 0.248237, -0.0309456, 0.118711, -0.00737097)
|
||||
|
||||
[node name="Skeleton3D" parent="Handgun/Handgun_Armature" index="0"]
|
||||
bones/0/pose = Transform3D(1, -1.42109e-14, -5.04871e-29, 1.42109e-14, 1, -3.58732e-43, 5.04871e-29, -3.58732e-43, 1, 0, 0, 0)
|
||||
bones/1/pose = Transform3D(1, 1.42109e-14, -2.01948e-28, -1.42109e-14, 1, -1.42109e-14, 0, 1.42109e-14, 1, 0, 0, 0)
|
||||
|
|
|
@ -136,7 +136,9 @@ show_scoretab={
|
|||
|
||||
[rendering]
|
||||
|
||||
reflections/sky_reflections/fast_filter_high_quality=true
|
||||
environment/ssao/quality=0
|
||||
environment/screen_space_reflection/roughness_quality=3
|
||||
global_illumination/sdfgi/probe_ray_count=2
|
||||
global_illumination/sdfgi/frames_to_converge=0
|
||||
global_illumination/sdfgi/frames_to_update_lights=4
|
||||
|
|
Loading…
Reference in New Issue