Better bullet traces and raycast for hitscan

This commit is contained in:
2025-01-26 10:59:59 +01:00
parent 1c8458048c
commit 7da4a3d6bb
26 changed files with 1444 additions and 292 deletions

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=54 format=4 uid="uid://dtvo21mk1webd"]
[gd_scene load_steps=55 format=4 uid="uid://dtvo21mk1webd"]
[ext_resource type="Script" path="res://scenes/weapon/guns/ak/with_hands.gd" id="1_2iqts"]
[ext_resource type="PackedScene" uid="uid://dab7jttp7ywfh" path="res://scenes/weapon/guns/ak/gun.tscn" id="1_aaafm"]
[ext_resource type="PackedScene" uid="uid://bjyltbtx45cqs" path="res://scenes/weapon/misc/bullet_trace_distance.tscn" id="3_5ff4y"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tg27p"]
@ -734,5 +735,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.286444, 0, -0.397435)
mesh = SubResource("ArrayMesh_kj4i3")
skeleton = NodePath("")
[node name="Barrel" type="Node3D" parent="."]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0.161938, -4.38604)
[node name="BulletTraceDistance" parent="." instance=ExtResource("3_5ff4y")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -3.86167e-07, 0.200684, -4.41724)