Fix the aiming and bullet creation
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://bmm3brgvr4d86"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://bmm3brgvr4d86"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/player/player_input_controller.gd" id="1_m6tul"]
|
||||
[ext_resource type="Script" path="res://scenes/player/placeholder.gd" id="1_ts455"]
|
||||
[ext_resource type="Texture2D" uid="uid://oopj5mj1vdp0" path="res://assets/crosshairs/crosshair_default.png" id="3_8ulsx"]
|
||||
[ext_resource type="PackedScene" uid="uid://dtvo21mk1webd" path="res://scenes/weapon/guns/ak/with_hands.tscn" id="3_xxv4y"]
|
||||
[ext_resource type="PackedScene" uid="uid://1txob6jskn5s" path="res://scenes/characters/blue/dummy.tscn" id="5_16l76"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_taqso"]
|
||||
radius = 0.4
|
||||
@ -66,9 +67,13 @@ tracks/0/keys = {
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, -0.01, -0.01), Vector3(0, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fhivu"]
|
||||
resource_name = "idle"
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_u1b6p"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_falg4"),
|
||||
"idle": SubResource("Animation_fhivu"),
|
||||
"move": SubResource("Animation_mkk0p"),
|
||||
"shooting": SubResource("Animation_ah507")
|
||||
}
|
||||
@ -86,6 +91,18 @@ properties/2/replication_mode = 1
|
||||
properties/3/path = NodePath(".:initial_position")
|
||||
properties/3/spawn = true
|
||||
properties/3/replication_mode = 2
|
||||
properties/4/path = NodePath("PlayerControlledNode/CameraMount/BulletStartingPoint:position")
|
||||
properties/4/spawn = true
|
||||
properties/4/replication_mode = 1
|
||||
properties/5/path = NodePath("PlayerControlledNode/CameraMount/BulletStartingPoint:rotation")
|
||||
properties/5/spawn = true
|
||||
properties/5/replication_mode = 1
|
||||
properties/6/path = NodePath("PlayerControlledNode/CameraMount:rotation")
|
||||
properties/6/spawn = true
|
||||
properties/6/replication_mode = 1
|
||||
properties/7/path = NodePath("ServerControlledNode/BulletStartingPoint:rotation")
|
||||
properties/7/spawn = true
|
||||
properties/7/replication_mode = 1
|
||||
|
||||
[node name="Placeholder" type="Node3D"]
|
||||
script = ExtResource("1_ts455")
|
||||
@ -99,7 +116,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.786919, 0)
|
||||
shape = SubResource("CapsuleShape3D_taqso")
|
||||
|
||||
[node name="CameraMount" type="Node3D" parent="PlayerControlledNode"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.29568, -0.412934)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.29568, -0.355108)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="PlayerControlledNode/CameraMount"]
|
||||
cull_mask = 524287
|
||||
@ -173,23 +190,17 @@ fov = 40.0
|
||||
[node name="GunMount" type="Node3D" parent="PlayerControlledNode/CameraMount/Camera3D/HUD/SubViewportContainer/SubViewport/Camera3D"]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="PlayerControlledNode/CameraMount/Camera3D/HUD/SubViewportContainer/SubViewport/Camera3D/GunMount"]
|
||||
active = false
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_u1b6p")
|
||||
}
|
||||
|
||||
[node name="WithHands" parent="PlayerControlledNode/CameraMount/Camera3D/HUD/SubViewportContainer/SubViewport/Camera3D/GunMount" instance=ExtResource("3_xxv4y")]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0.51335, -0.655058, -1.67097)
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -0.3, -0.4, 0)
|
||||
visible = false
|
||||
|
||||
[node name="BulletStartingPoint" type="Node3D" parent="PlayerControlledNode/CameraMount"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -0.42185)
|
||||
|
||||
[node name="AimRay" type="RayCast3D" parent="PlayerControlledNode/CameraMount/BulletStartingPoint"]
|
||||
target_position = Vector3(0, 0, 1000)
|
||||
hit_from_inside = true
|
||||
collide_with_areas = true
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="PlayerControlledNode"]
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
@ -205,4 +216,13 @@ collision_layer = 4
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.786919, 0)
|
||||
shape = SubResource("CapsuleShape3D_taqso")
|
||||
|
||||
[node name="BulletStartingPoint" type="Node3D" parent="ServerControlledNode"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.287, -0.54568)
|
||||
|
||||
[node name="Dummy" parent="ServerControlledNode" instance=ExtResource("5_16l76")]
|
||||
visible = false
|
||||
|
||||
[node name="CameraMount" type="Node3D" parent="ServerControlledNode"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.15245, -0.0611187)
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
|
Reference in New Issue
Block a user