Fireball, need to tweak the animation to get some grey at the end like the standing fire
Deploy Promiscuity Auth API / deploy (push) Has been cancelled
Deploy Promiscuity Character API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
Deploy Promiscuity Auth API / deploy (push) Has been cancelled
Deploy Promiscuity Character API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
SHIFT + B
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
extends Area3D
|
||||
|
||||
@export var initial_speed := 24.0
|
||||
@export var minimum_speed := 4.0
|
||||
@export var deceleration := 9.0
|
||||
@export var lifetime := 3.0
|
||||
|
||||
var _direction := Vector3.FORWARD
|
||||
var _speed := initial_speed
|
||||
var _age := 0.0
|
||||
|
||||
|
||||
func launch(origin: Vector3, direction: Vector3) -> void:
|
||||
global_position = origin
|
||||
if direction.length() > 0.0001:
|
||||
_direction = direction.normalized()
|
||||
look_at(global_position + _direction, Vector3.UP)
|
||||
_speed = initial_speed
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
body_entered.connect(_on_body_entered)
|
||||
area_entered.connect(_on_area_entered)
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
_age += delta
|
||||
if _age >= lifetime:
|
||||
queue_free()
|
||||
return
|
||||
|
||||
global_position += _direction * _speed * delta
|
||||
_speed = move_toward(_speed, minimum_speed, deceleration * delta)
|
||||
|
||||
|
||||
func _on_body_entered(_body: Node3D) -> void:
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_area_entered(_area: Area3D) -> void:
|
||||
queue_free()
|
||||
@@ -0,0 +1 @@
|
||||
uid://bm0h12cdnatgh
|
||||
@@ -0,0 +1,89 @@
|
||||
[gd_scene format=3 uid="uid://cnqyidky3strc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bm0h12cdnatgh" path="res://scenes/Projectiles/fireball.gd" id="1_fireball_script"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2dmnrm3ubjon" path="res://assets/textures/stolenFire.png" id="2_fire_texture"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_fireball"]
|
||||
radius = 0.35
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fireball"]
|
||||
transparency = 1
|
||||
cull_mode = 2
|
||||
albedo_color = Color(1, 0.48, 0.12, 1)
|
||||
albedo_texture = ExtResource("2_fire_texture")
|
||||
emission_enabled = true
|
||||
emission = Color(1, 0.32, 0.08, 1)
|
||||
emission_energy_multiplier = 3.0
|
||||
billboard_mode = 1
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_fireball"]
|
||||
material = SubResource("StandardMaterial3D_fireball")
|
||||
radius = 0.35
|
||||
height = 0.7
|
||||
radial_segments = 32
|
||||
rings = 16
|
||||
|
||||
[sub_resource type="Curve" id="Curve_fireball_alpha"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.2, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_fireball_alpha"]
|
||||
curve = SubResource("Curve_fireball_alpha")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_mhwgj"]
|
||||
offsets = PackedFloat32Array(0, 0.45, 0.78, 1)
|
||||
colors = PackedColorArray(1, 0.95, 0.55, 1, 1, 0.29, 0.05, 1, 0.42, 0.42, 0.42, 0.75, 0.16, 0.16, 0.16, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_fireball"]
|
||||
gradient = SubResource("Gradient_mhwgj")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_fireball_scale"]
|
||||
_data = [Vector2(0, 0.35), 0.0, 0.0, 0, 0, Vector2(0.35, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.15), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_fireball_scale"]
|
||||
curve = SubResource("Curve_fireball_scale")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_fireball"]
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 0.25
|
||||
angle_min = -180.0
|
||||
angle_max = 180.0
|
||||
direction = Vector3(0, 0, 1)
|
||||
spread = 180.0
|
||||
initial_velocity_min = 0.3
|
||||
initial_velocity_max = 1.8
|
||||
gravity = Vector3(0, 1.5, 0)
|
||||
scale_min = 0.35
|
||||
scale_max = 0.9
|
||||
scale_curve = SubResource("CurveTexture_fireball_scale")
|
||||
color = Color(1, 0.47, 0.12, 1)
|
||||
color_ramp = SubResource("GradientTexture1D_fireball")
|
||||
alpha_curve = SubResource("CurveTexture_fireball_alpha")
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_fireball_particle"]
|
||||
material = SubResource("StandardMaterial3D_fireball")
|
||||
size = Vector2(0.75, 0.75)
|
||||
|
||||
[node name="Fireball" type="Area3D" unique_id=1503468252]
|
||||
collision_layer = 8
|
||||
collision_mask = 7
|
||||
monitorable = false
|
||||
script = ExtResource("1_fireball_script")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1304632772]
|
||||
shape = SubResource("SphereShape3D_fireball")
|
||||
|
||||
[node name="Core" type="MeshInstance3D" parent="." unique_id=1406426055]
|
||||
mesh = SubResource("SphereMesh_fireball")
|
||||
|
||||
[node name="Glow" type="OmniLight3D" parent="." unique_id=844333466]
|
||||
light_color = Color(1, 0.42, 0.12, 1)
|
||||
light_energy = 2.5
|
||||
|
||||
[node name="Trail" type="GPUParticles3D" parent="." unique_id=890543085]
|
||||
amount = 36
|
||||
lifetime = 0.45
|
||||
preprocess = 0.2
|
||||
process_material = SubResource("ParticleProcessMaterial_fireball")
|
||||
draw_pass_1 = SubResource("QuadMesh_fireball_particle")
|
||||
Reference in New Issue
Block a user