feat: implemented basics for weapons

This commit is contained in:
Sara 2025-07-17 12:49:32 +02:00
parent 6fa9d11af5
commit aecc40ed6e
15 changed files with 163 additions and 51 deletions

View file

@ -2,6 +2,7 @@
[resource]
resource_name = "arms"
cull_mode = 2
albedo_color = Color(0.9063318, 0.9063318, 0.9063318, 1)
roughness = 0.5
use_z_clip_scale = true

View file

@ -34,9 +34,9 @@ animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract=1
materials/extract_format=0
materials/extract_path=""
materials/extract_path="res://assets/materials/weapons"
_subresources={
"materials": {
"arms": {

View file

@ -40,167 +40,180 @@ slide_on_ceiling = false
use_collision = true
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.948, 3.13319, -1.86438)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.424776, 3.13319, -1.86438)
use_collision = true
size = Vector3(10.441, 7.09393, 25.165)
size = Vector3(10.441, 7.09393, 42.19336)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D27" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.086981, 3.13319, -1.86438)
use_collision = true
size = Vector3(10.441, 7.09393, 42.19336)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.9688, 1.13, 6.77715)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.4455757, 1.13, 6.77715)
operation = 2
use_collision = true
size = Vector3(9.8421, 3.074, 7.48355)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D5" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.9688, 1.13, -1.92168)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.4455757, 1.13, -1.92168)
operation = 2
use_collision = true
size = Vector3(9.8421, 3.074, 9.25056)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D6" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.9688, 1.13, -10.4467)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.4455757, 1.13, -10.4467)
operation = 2
use_collision = true
size = Vector3(9.8421, 3.074, 7.48355)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D10" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.9688, 4.73767, 6.77715)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.4455757, 4.73767, 6.77715)
operation = 2
use_collision = true
size = Vector3(9.8421, 3.074, 7.48355)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D11" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.9688, 4.73767, -1.92168)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.4455757, 4.73767, -1.92168)
operation = 2
use_collision = true
size = Vector3(9.8421, 3.074, 9.25056)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D12" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.9688, 4.73767, -10.4467)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.4455757, 4.73767, -10.4467)
operation = 2
use_collision = true
size = Vector3(9.8421, 3.074, 7.48355)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.01349, 0.843177, 5.73304)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.4902663, 0.843177, 5.73304)
operation = 2
use_collision = true
size = Vector3(2.16355, 2.81146, 1.43037)
size = Vector3(1.5039063, 2.81146, 1.43037)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D19" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.7667, 3.00782, 8.93745)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.243476, 3.00782, 8.93745)
operation = 2
use_collision = true
size = Vector3(4.11031, 1.01367, 3.05259)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D13" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 5.15978, 8.92892)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 5.15978, 8.92892)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D14" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 5.15978, 5.36833)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 5.15978, 5.36833)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 3.01134)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D17" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 5.15978, -4.15471)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 5.15978, -4.15471)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D20" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 1.63843, -12.371)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 1.63843, -12.371)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D21" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 1.63843, -3.73614)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 1.63843, -3.73614)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D23" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 1.63843, 0.557484)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 1.63843, 0.557484)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D22" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 1.63843, 8.83479)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 1.63843, 8.83479)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D18" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 5.15978, -8.38057)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 5.15978, -8.38057)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 1.75998)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D15" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 5.15978, -0.349048)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 5.15978, -0.349048)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 3.46446)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D16" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.03735, 5.15978, -11.8593)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5141263, 5.15978, -11.8593)
operation = 2
use_collision = true
size = Vector3(1.64708, 1.47165, 3.46446)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D7" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.70662, 0.843177, -9.61435)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.1833963, 0.843177, -9.61435)
operation = 2
use_collision = true
size = Vector3(1.20117, 2.81146, 1.43037)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D8" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -14.1813, 0.843177, -6.9353)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -10.658076, 0.843177, -6.9353)
operation = 2
use_collision = true
size = Vector3(1.71875, 2.81146, 1.43037)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D9" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -8.47255, 1.11953, 3.07464)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -4.9493265, 1.11953, 3.07464)
operation = 2
use_collision = true
size = Vector3(1.43066, 2.25876, 1.43037)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D24" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -8.47255, 4.34085, 3.07464)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -4.9493265, 4.34085, 3.07464)
operation = 2
use_collision = true
size = Vector3(1.43066, 2.25876, 1.43037)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D26" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-1, 0, -8.742279e-08, 0, 1, 0, 8.742279e-08, 0, -1, -12.553127, 4.340849, -9.004332)
operation = 2
use_collision = true
size = Vector3(1.43066, 2.25876, 1.43037)
material = ExtResource("1_ng1ul")
[node name="CSGBox3D25" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -14.0385, 4.34085, -6.63972)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -10.515276, 4.34085, -6.63972)
operation = 2
use_collision = true
size = Vector3(1.43066, 2.25876, 1.43037)

View file

@ -1,4 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://snjgu4yp5swd"]
[gd_scene load_steps=3 format=3 uid="uid://snjgu4yp5swd"]
[ext_resource type="PackedScene" uid="uid://ce40pq785yoyi" path="res://objects/weapons/rifle.tscn" id="1_eqqp1"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
@ -17,3 +19,5 @@ transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.6
fov = 60.0
[node name="WeaponInventory" type="WeaponInventory" parent="."]
unique_name_in_owner = true
fallback_weapon = ExtResource("1_eqqp1")