Files
fps_project_1/assets/shotgun_pellet.tscn
2025-03-05 09:27:42 -06:00

61 lines
1.8 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://717hhehp83k8"]
[ext_resource type="Script" uid="uid://bcbbd3xsm85cu" path="res://scripts/shotgun_pellet.gd" id="1_1v1ju"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_0ewk3"]
bounce = 0.3
[sub_resource type="SphereMesh" id="SphereMesh_5okb1"]
radius = 0.05
height = 0.1
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_we7vv"]
metallic = 1.0
roughness = 0.3
emission_enabled = true
emission = Color(1, 0.476275, 0.212537, 1)
emission_energy_multiplier = 20.0
[sub_resource type="SphereShape3D" id="SphereShape3D_55xw1"]
radius = 0.05
[sub_resource type="Animation" id="Animation_s2rms"]
resource_name = "pellet_glow"
[sub_resource type="AnimationLibrary" id="AnimationLibrary_2bjxd"]
_data = {
&"pellet_glow": SubResource("Animation_s2rms")
}
[node name="ShotgunPellet" type="RigidBody3D" groups=["pellet", "spawned"]]
visible = false
collision_layer = 160
collision_mask = 237
mass = 0.01
physics_material_override = SubResource("PhysicsMaterial_0ewk3")
continuous_cd = true
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_1v1ju")
max_bounces = 20
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_5okb1")
surface_material_override/0 = SubResource("StandardMaterial3D_we7vv")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_55xw1")
[node name="Timer" type="Timer" parent="."]
wait_time = 10.0
one_shot = true
autostart = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_2bjxd")
}
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]