mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-01-19 19:44:46 +00:00
Add jetpack effect
This commit is contained in:
parent
0251dc0a5e
commit
a0427a9a37
BIN
entities/player/assets/jetpackfx/Particle01.png
Normal file
BIN
entities/player/assets/jetpackfx/Particle01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
35
entities/player/assets/jetpackfx/Particle01.png.import
Normal file
35
entities/player/assets/jetpackfx/Particle01.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dmf12llra7aq5"
|
||||
path.s3tc="res://.godot/imported/Particle01.png-789728e4e363d58f11747b3cf3c5d5a3.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/Particle01.png"
|
||||
dest_files=["res://.godot/imported/Particle01.png-789728e4e363d58f11747b3cf3c5d5a3.s3tc.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
|
||||
BIN
entities/player/assets/jetpackfx/smoke_01.png
Normal file
BIN
entities/player/assets/jetpackfx/smoke_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
35
entities/player/assets/jetpackfx/smoke_01.png.import
Normal file
35
entities/player/assets/jetpackfx/smoke_01.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ct1v5iadtpadm"
|
||||
path.s3tc="res://.godot/imported/smoke_01.png-5c3d69bc74b2f317eac64d37cd67aed3.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_01.png"
|
||||
dest_files=["res://.godot/imported/smoke_01.png-5c3d69bc74b2f317eac64d37cd67aed3.s3tc.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
|
||||
BIN
entities/player/assets/jetpackfx/smoke_02.png
Normal file
BIN
entities/player/assets/jetpackfx/smoke_02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
35
entities/player/assets/jetpackfx/smoke_02.png.import
Normal file
35
entities/player/assets/jetpackfx/smoke_02.png.import
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://doxo4vfn0bjlp"
|
||||
path.s3tc="res://.godot/imported/smoke_02.png-a5343a97ff1cefeebcd82e41218739ca.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_02.png"
|
||||
dest_files=["res://.godot/imported/smoke_02.png-a5343a97ff1cefeebcd82e41218739ca.s3tc.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
|
||||
BIN
entities/player/assets/jetpackfx/smoke_05.png
Normal file
BIN
entities/player/assets/jetpackfx/smoke_05.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
34
entities/player/assets/jetpackfx/smoke_05.png.import
Normal file
34
entities/player/assets/jetpackfx/smoke_05.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dg8jhudb2pp5"
|
||||
path="res://.godot/imported/smoke_05.png-0e09dd48bb034f353433668dafb91bd9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_05.png"
|
||||
dest_files=["res://.godot/imported/smoke_05.png-0e09dd48bb034f353433668dafb91bd9.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
BIN
entities/player/assets/jetpackfx/smoke_06.png
Normal file
BIN
entities/player/assets/jetpackfx/smoke_06.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
34
entities/player/assets/jetpackfx/smoke_06.png.import
Normal file
34
entities/player/assets/jetpackfx/smoke_06.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bj3byo4v71rub"
|
||||
path="res://.godot/imported/smoke_06.png-551015dc27729e05438bc76194d0b9c3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/player/assets/jetpackfx/smoke_06.png"
|
||||
dest_files=["res://.godot/imported/smoke_06.png-551015dc27729e05438bc76194d0b9c3.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
|
|
@ -54,6 +54,7 @@ enum PlayerState { PLAYER_ALIVE, PLAYER_DEAD }
|
|||
@onready var _original_weapon_transform : Transform3D = weapon.transform
|
||||
@onready var tp_player : Vanguard = $Smoothing/ThirdPerson/PlayerMesh
|
||||
@onready var _game_settings : Settings = get_node("/root/GlobalSettings")
|
||||
@onready var jetpack_particles : Array = $Smoothing/ThirdPerson/PlayerMesh/JetpackFX.get_children()
|
||||
|
||||
signal died(player : Player, killer_id : int)
|
||||
signal energy_changed(energy : float)
|
||||
|
|
@ -135,6 +136,7 @@ func _handle_jetpack(direction : Vector3) -> void:
|
|||
var up_vector : Vector3 = Vector3.UP * jetpack_vertical_force * jetpack_force_factor
|
||||
var side_vector : Vector3 = direction * jetpack_horizontal_force * jetpack_force_factor
|
||||
apply_force(up_vector + side_vector)
|
||||
display_jetpack_particles()
|
||||
|
||||
func _update_jetpack_energy(delta : float) -> void:
|
||||
if input.jetting:
|
||||
|
|
@ -242,3 +244,7 @@ func respawn(location : Vector3) -> void:
|
|||
func _exit_tree() -> void:
|
||||
player_state = PlayerState.PLAYER_DEAD
|
||||
flag_carry_component.drop()
|
||||
|
||||
func display_jetpack_particles() -> void:
|
||||
for particle: GPUParticles3D in jetpack_particles:
|
||||
particle.emitting = true
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=19 format=3 uid="uid://cbhx1xme0sb7k"]
|
||||
[gd_scene load_steps=41 format=3 uid="uid://cbhx1xme0sb7k"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/player/player.gd" id="1_mk68k"]
|
||||
[ext_resource type="PackedScene" uid="uid://drbefw6akui2v" path="res://entities/player/assets/vanguard.tscn" id="2_beyex"]
|
||||
|
|
@ -11,6 +11,9 @@
|
|||
[ext_resource type="PackedScene" uid="uid://2t8ql8pkxv6c" path="res://components/flag_carry_component.tscn" id="7_e7s1a"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3l7fvbdg6m5g" path="res://entities/flag/assets/flag.glb" id="9_fce2y"]
|
||||
[ext_resource type="Script" path="res://addons/smoothing/smoothing.gd" id="11_k330l"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct1v5iadtpadm" path="res://entities/player/assets/jetpackfx/smoke_01.png" id="12_ypuho"]
|
||||
[ext_resource type="Texture2D" uid="uid://doxo4vfn0bjlp" path="res://entities/player/assets/jetpackfx/smoke_02.png" id="13_wvbf0"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmf12llra7aq5" path="res://entities/player/assets/jetpackfx/Particle01.png" id="14_vughy"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_clur0"]
|
||||
resource_local_to_scene = true
|
||||
|
|
@ -89,6 +92,114 @@ properties/3/path = NodePath(".:skiing")
|
|||
properties/3/spawn = false
|
||||
properties/3/replication_mode = 2
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_3u0pn"]
|
||||
offsets = PackedFloat32Array(0, 0.872727)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_wjoiw"]
|
||||
gradient = SubResource("Gradient_3u0pn")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_pmb0n"]
|
||||
max_value = 2.0
|
||||
_data = [Vector2(0, 0.197802), 0.0, 0.0, 0, 0, Vector2(1, 2), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_cj8ky"]
|
||||
curve = SubResource("Curve_pmb0n")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_v556h"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.1
|
||||
angle_min = -381.7
|
||||
angle_max = 381.7
|
||||
gravity = Vector3(0, -5, 0)
|
||||
tangential_accel_min = -5.0
|
||||
tangential_accel_max = 5.0
|
||||
scale_curve = SubResource("CurveTexture_cj8ky")
|
||||
color_ramp = SubResource("GradientTexture1D_wjoiw")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_27esd"]
|
||||
transparency = 1
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("12_ypuho")
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_hegkl"]
|
||||
material = SubResource("StandardMaterial3D_27esd")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_f4nyt"]
|
||||
offsets = PackedFloat32Array(0, 0.972727)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_ovx5q"]
|
||||
gradient = SubResource("Gradient_f4nyt")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_l8e6j"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.1
|
||||
angle_min = -381.7
|
||||
angle_max = 381.7
|
||||
gravity = Vector3(0, -5, 0)
|
||||
tangential_accel_min = -5.0
|
||||
tangential_accel_max = 5.0
|
||||
scale_curve = SubResource("CurveTexture_cj8ky")
|
||||
color_ramp = SubResource("GradientTexture1D_ovx5q")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bknuu"]
|
||||
transparency = 1
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("13_wvbf0")
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
grow_amount = 1.506
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_aeure"]
|
||||
material = SubResource("StandardMaterial3D_bknuu")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_t1nsw"]
|
||||
offsets = PackedFloat32Array(0, 0.627273, 0.927273)
|
||||
colors = PackedColorArray(1, 0.858824, 0.0784314, 1, 1, 0, 0, 1, 1, 0, 0, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_x0y0j"]
|
||||
gradient = SubResource("Gradient_t1nsw")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_fkrx7"]
|
||||
max_value = 2.0
|
||||
_data = [Vector2(0, 0.197802), 0.0, 0.0, 0, 0, Vector2(0.594203, 0.395604), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_frkde"]
|
||||
curve = SubResource("Curve_fkrx7")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_q1vdw"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.05
|
||||
angle_min = -381.7
|
||||
angle_max = 381.7
|
||||
gravity = Vector3(0, -5, 0)
|
||||
tangential_accel_min = -5.0
|
||||
tangential_accel_max = 5.0
|
||||
scale_curve = SubResource("CurveTexture_frkde")
|
||||
color_ramp = SubResource("GradientTexture1D_x0y0j")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2jwv2"]
|
||||
transparency = 1
|
||||
blend_mode = 1
|
||||
cull_mode = 2
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("14_vughy")
|
||||
emission_enabled = true
|
||||
emission = Color(1, 0.823529, 0.701961, 1)
|
||||
billboard_mode = 3
|
||||
billboard_keep_scale = true
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = false
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_uc7ts"]
|
||||
material = SubResource("StandardMaterial3D_2jwv2")
|
||||
|
||||
[node name="Player" type="RigidBody3D" node_paths=PackedStringArray("iff")]
|
||||
collision_mask = 2147483649
|
||||
axis_lock_angular_x = true
|
||||
|
|
@ -185,6 +296,33 @@ transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.602515, 0)
|
|||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
spine_ik_target_attachment = NodePath("../../SpringArm3D/SpineIKTarget")
|
||||
|
||||
[node name="JetpackFX" type="Node3D" parent="Smoothing/ThirdPerson/PlayerMesh"]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0.187666, 0.238235, -0.147731)
|
||||
|
||||
[node name="Smoke1" type="GPUParticles3D" parent="Smoothing/ThirdPerson/PlayerMesh/JetpackFX"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.150648, 0)
|
||||
emitting = false
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_v556h")
|
||||
draw_pass_1 = SubResource("QuadMesh_hegkl")
|
||||
|
||||
[node name="Smoke2" type="GPUParticles3D" parent="Smoothing/ThirdPerson/PlayerMesh/JetpackFX"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.108846, 0)
|
||||
emitting = false
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_l8e6j")
|
||||
draw_pass_1 = SubResource("QuadMesh_aeure")
|
||||
|
||||
[node name="Fire1" type="GPUParticles3D" parent="Smoothing/ThirdPerson/PlayerMesh/JetpackFX"]
|
||||
emitting = false
|
||||
amount = 16
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_q1vdw")
|
||||
draw_pass_1 = SubResource("QuadMesh_uc7ts")
|
||||
|
||||
[node name="IFFAttachment" type="Marker3D" parent="Smoothing/ThirdPerson"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.27457, 0)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue