Laser destroys Asteroid
parent
6f7d59682f
commit
9aff213b2d
@ -0,0 +1,10 @@
|
||||
[gd_resource type="StandardMaterial3D" load_steps=3 format=3 uid="uid://c8qfub1ip6uqj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://x26n7stwftii" path="res://Textures/vehicle_playerShip_orange_dff.png" id="1_kbocw"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsoehauordi1i" path="res://Textures/vehicle_playerShip_orange_nrm.png" id="2_hmmbf"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_kbocw")
|
||||
normal_enabled = true
|
||||
normal_scale = 2.0
|
||||
normal_texture = ExtResource("2_hmmbf")
|
||||
@ -0,0 +1,10 @@
|
||||
[gd_resource type="StandardMaterial3D" load_steps=3 format=3 uid="uid://cdygx16ou11yk"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bt2aj3hcmb87q" path="res://Textures/prop_asteroid_01_dff.png" id="1_q5cc1"]
|
||||
[ext_resource type="Texture2D" uid="uid://swmr1hw148bp" path="res://Textures/prop_asteroid_01_nrm.png" id="2_wilpe"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_q5cc1")
|
||||
normal_enabled = true
|
||||
normal_scale = 2.0
|
||||
normal_texture = ExtResource("2_wilpe")
|
||||
@ -0,0 +1,10 @@
|
||||
[gd_resource type="StandardMaterial3D" load_steps=3 format=3 uid="uid://ck5lw8ahodm7l"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://4sc40fjd4myy" path="res://Textures/prop_asteroid_03_dff.png" id="1_spi38"]
|
||||
[ext_resource type="Texture2D" uid="uid://qy0a83vkelqe" path="res://Textures/prop_asteroid_03_nrm.png" id="2_rt7ui"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_spi38")
|
||||
normal_enabled = true
|
||||
normal_scale = 2.0
|
||||
normal_texture = ExtResource("2_rt7ui")
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,16 +1,28 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ck31g3hvggoh"]
|
||||
|
||||
[ext_resource type="Material" uid="uid://jsqnryvk0qes" path="res://Material/LaserBeamProcess.tres" id="1_6pmub"]
|
||||
[ext_resource type="CapsuleMesh" uid="uid://yydtguqwa6us" path="res://Material/LaserBeamMaterial.tres" id="2_tfobi"]
|
||||
[ext_resource type="TubeTrailMesh" uid="uid://c1o741o1u6ad7" path="res://Material/LaserBeamTrail.tres" id="3_ntth3"]
|
||||
[ext_resource type="Script" path="res://Scripts/LaserBeam.cs" id="1_52i1t"]
|
||||
|
||||
[node name="LaserBeam" type="Node3D"]
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_n8opw"]
|
||||
radius = 0.05
|
||||
|
||||
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
|
||||
emitting = false
|
||||
amount = 1
|
||||
trail_enabled = true
|
||||
process_material = ExtResource("1_6pmub")
|
||||
draw_passes = 2
|
||||
draw_pass_1 = ExtResource("2_tfobi")
|
||||
draw_pass_2 = ExtResource("3_ntth3")
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_wdq46"]
|
||||
emission_enabled = true
|
||||
emission = Color(1, 1, 0, 1)
|
||||
emission_energy_multiplier = 10.0
|
||||
|
||||
[node name="LaserBeam" type="Node3D" node_paths=PackedStringArray("rigidBody")]
|
||||
script = ExtResource("1_52i1t")
|
||||
rigidBody = NodePath("RigidBody3D")
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
||||
mass = 0.1
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="RigidBody3D"]
|
||||
shape = SubResource("SphereShape3D_n8opw")
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="RigidBody3D/CollisionShape3D"]
|
||||
radius = 0.05
|
||||
radial_segments = 24
|
||||
rings = 12
|
||||
material = SubResource("StandardMaterial3D_wdq46")
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
|
||||
public partial class LaserBeam : Node3D {
|
||||
[Export] private RigidBody3D rigidBody;
|
||||
private float speed = 10f;
|
||||
public override void _Ready() {
|
||||
Vector3 movement = new(0f, 0f, -speed);
|
||||
rigidBody.AddConstantForce(movement);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue