Blaster with emitting particles

master
Sascha 2023-09-17 09:54:05 +07:00
parent 33a63b1aa9
commit 5b4d8801eb
3 changed files with 68 additions and 14 deletions

Binary file not shown.

@ -0,0 +1,32 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://by8bcu3t3opfd"
path="res://.godot/imported/blasterA.glb-2a6f70ddbb2ad46e43e3d62f73cdc485.scn"
[deps]
source_file="res://graphics/blasterA.glb"
dest_files=["res://.godot/imported/blasterA.glb-2a6f70ddbb2ad46e43e3d62f73cdc485.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1

@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://bwn0di86nkots"]
[gd_scene load_steps=18 format=3 uid="uid://bwn0di86nkots"]
[ext_resource type="Script" path="res://scripts/World.cs" id="1_2chdl"]
[ext_resource type="PackedScene" uid="uid://bpf3krgeeo7pt" path="res://scenes/Box.tscn" id="2_gmm05"]
@ -9,6 +9,7 @@
[ext_resource type="PackedScene" uid="uid://bxa0dvonmob7f" path="res://scenes/RedBox.tscn" id="5_o3ohm"]
[ext_resource type="PackedScene" uid="uid://dgufgjsdd5407" path="res://scenes/PurpleBox.tscn" id="6_kqrbp"]
[ext_resource type="Script" path="res://scripts/ShootController.cs" id="9_tfx87"]
[ext_resource type="PackedScene" uid="uid://by8bcu3t3opfd" path="res://graphics/blasterA.glb" id="10_xs3ad"]
[sub_resource type="Sky" id="Sky_kc6p3"]
@ -29,12 +30,33 @@ volumetric_fog_enabled = true
volumetric_fog_density = 0.0005
[sub_resource type="BoxShape3D" id="BoxShape3D_fl40q"]
size = Vector3(100, 0.1, 100)
size = Vector3(120, 0.1, 80)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_t4i04"]
albedo_texture = ExtResource("3_c3cx5")
uv1_scale = Vector3(32, 32, 32)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_qlryv"]
lifetime_randomness = 1.0
direction = Vector3(-0.5, 0, 1)
spread = 33.0
initial_velocity_min = 20.0
initial_velocity_max = 30.0
scale_min = 0.5
scale_max = 1.5
collision_mode = 1
collision_friction = 1.0
collision_bounce = 1.0
collision_use_scale = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fyuin"]
emission_enabled = true
emission = Color(1, 1, 0, 1)
emission_energy_multiplier = 2.0
[sub_resource type="SphereMesh" id="SphereMesh_d1ukr"]
material = SubResource("StandardMaterial3D_fyuin")
[node name="World" type="Node3D" node_paths=PackedStringArray("fpsLabel", "boxesLabel", "collisionsLabel")]
script = ExtResource("1_2chdl")
boxScenes = [ExtResource("2_gmm05"), ExtResource("3_621lc"), ExtResource("4_1w77b"), ExtResource("5_o3ohm"), ExtResource("6_kqrbp")]
@ -66,7 +88,7 @@ freeze = true
shape = SubResource("BoxShape3D_fl40q")
[node name="FloorCSGBox3D" type="CSGBox3D" parent="Floor/FloorRigidBody3D/FloorCollisionShape3D"]
transform = Transform3D(100, 0, 0, 0, 0.1, 0, 0, 0, 100, 0, 0, 0)
transform = Transform3D(120, 0, 0, 0, 0.1, 0, 0, 0, 80, 0, 0, 0)
material = SubResource("StandardMaterial3D_t4i04")
[node name="CanvasGroup" type="CanvasGroup" parent="."]
@ -95,14 +117,14 @@ text = "Collisions: 0"
[node name="ShootController" type="Node" parent="."]
script = ExtResource("9_tfx87")
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 19, 0)
emitting = false
amount = 1
lifetime = 10.0
one_shot = true
trail_enabled = true
[node name="GPUParticlesCollisionBox3D" type="GPUParticlesCollisionBox3D" parent="GPUParticles3D"]
[node name="GPUParticlesCollisionSphere3D" type="GPUParticlesCollisionSphere3D" parent="GPUParticles3D/GPUParticlesCollisionBox3D"]
[node name="blasterA" parent="." instance=ExtResource("10_xs3ad")]
transform = Transform3D(-5, 0, -4.76837e-07, 0, 5, 0, 4.76837e-07, 0, -5, 0, 20, 45)
[node name="GPUParticles3D" type="GPUParticles3D" parent="blasterA"]
transform = Transform3D(1.91068e-16, 0.1, 8.88178e-16, -0.1, 1.91069e-16, -4.37114e-09, -4.37114e-09, -8.88178e-16, 0.1, -0.00528272, 0.116093, 0.358054)
amount = 100
lifetime = 60.0
speed_scale = 5.0
randomness = 1.0
process_material = SubResource("ParticleProcessMaterial_qlryv")
draw_pass_1 = SubResource("SphereMesh_d1ukr")