summaryrefslogtreecommitdiff
path: root/godot/scenes/characters/PlayerRigid.tscn
diff options
context:
space:
mode:
authorAnson Bridges <bridges.anson@gmail.com>2022-09-25 06:39:12 -0400
committerAnson Bridges <bridges.anson@gmail.com>2022-09-25 06:39:12 -0400
commit7a1d857de96174dfa5a0fa40f8c14acbd2f651c2 (patch)
treed52acaa4e89b0f8375326ea1aefd0105bb91cfc7 /godot/scenes/characters/PlayerRigid.tscn
parent62039380a67b6da396d1c8d745d2e2625ba988fc (diff)
weapons, viewmodels, some performance fixes
Diffstat (limited to 'godot/scenes/characters/PlayerRigid.tscn')
-rw-r--r--godot/scenes/characters/PlayerRigid.tscn67
1 files changed, 28 insertions, 39 deletions
diff --git a/godot/scenes/characters/PlayerRigid.tscn b/godot/scenes/characters/PlayerRigid.tscn
index 5a5a63a..6e9fe48 100644
--- a/godot/scenes/characters/PlayerRigid.tscn
+++ b/godot/scenes/characters/PlayerRigid.tscn
@@ -1,19 +1,20 @@
-[gd_scene load_steps=11 format=2]
+[gd_scene load_steps=13 format=2]
[ext_resource path="res://scripts/characters/player_controller_new.gd" type="Script" id=1]
[ext_resource path="res://theming/FreeMono.otf" type="DynamicFontData" id=2]
[ext_resource path="res://scenes/characters/PlayerAreaDetect.gd" type="Script" id=3]
+[ext_resource path="res://scenes/characters/viewmodel_arms.tscn" type="PackedScene" id=4]
+[ext_resource path="res://scenes/weapons/hands.res" type="Resource" id=5]
+[ext_resource path="res://scenes/weapons/pistol.tres" type="Resource" id=6]
+[ext_resource path="res://scenes/weapons/rockets.tres" type="Resource" id=7]
-[sub_resource type="PhysicsMaterial" id=3]
+[sub_resource type="PhysicsMaterial" id=8]
resource_local_to_scene = true
rough = true
[sub_resource type="BoxShape" id=6]
extents = Vector3( 0.325, 0.9, 0.325 )
-[sub_resource type="CubeMesh" id=2]
-size = Vector3( 0.2, 0.2, 1 )
-
[sub_resource type="CubeMesh" id=4]
size = Vector3( 0.6, 1.8, 0.6 )
@@ -26,29 +27,32 @@ font_data = ExtResource( 2 )
[sub_resource type="BoxShape" id=1]
extents = Vector3( 0.325, 0.9, 0.325 )
-[sub_resource type="CylinderMesh" id=7]
-top_radius = 0.01
-bottom_radius = 0.01
-height = 0.3
-radial_segments = 6
-
[node name="Soldier" type="RigidBody" groups=["playable", "player"]]
collision_layer = 32769
collision_mask = 32769
mode = 2
mass = 80.0
-physics_material_override = SubResource( 3 )
+physics_material_override = SubResource( 8 )
continuous_cd = true
contacts_reported = 3
contact_monitor = true
+can_sleep = false
+axis_lock_angular_x = true
+axis_lock_angular_y = true
+axis_lock_angular_z = true
linear_damp = 0.0
angular_damp = 0.0
script = ExtResource( 1 )
+weapon_slot1 = ExtResource( 5 )
+weapon_slot2 = ExtResource( 6 )
+weapon_slot3 = ExtResource( 7 )
[node name="Collision" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0 )
shape = SubResource( 6 )
+[node name="WeaponSound" type="AudioStreamPlayer3D" parent="."]
+
[node name="Neck" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.44, 0 )
@@ -66,30 +70,16 @@ unique_name_in_owner = true
enabled = true
cast_to = Vector3( 0, 0, -2.5 )
collision_mask = 262145
-collide_with_areas = true
-[node name="viewmodel_c" type="ViewportContainer" parent="Neck"]
-visible = false
-margin_right = 1024.0
-margin_bottom = 600.0
-
-[node name="viewmodel" type="Viewport" parent="Neck/viewmodel_c"]
-size = Vector2( 1024, 600 )
-transparent_bg = true
-handle_input_locally = false
-render_target_update_mode = 0
-
-[node name="vm_camera" type="Camera" parent="Neck/viewmodel_c/viewmodel"]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.539779, 0 )
-cull_mask = 524288
-current = true
-fov = 90.0
-far = 75.9
-
-[node name="MeshInstance" type="MeshInstance" parent="Neck/viewmodel_c/viewmodel"]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0266792, -0.813922 )
-layers = 524288
-mesh = SubResource( 2 )
+[node name="GunRay" type="RayCast" parent="Neck/Head"]
+cast_to = Vector3( 0, 0, -300 )
+
+[node name="VIEWMODEL_ARMS" parent="Neck/Head" instance=ExtResource( 4 )]
+unique_name_in_owner = true
+transform = Transform( -0.1, 0, -1.50996e-08, 0, 0.1, 0, 1.50996e-08, 0, -0.1, 0, -0.055375, 0.0132675 )
+
+[node name="CarryPoint" type="Position3D" parent="Neck/Head"]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.07564 )
[node name="Feet" type="RayCast" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.03, 0 )
@@ -113,14 +103,13 @@ font = SubResource( 5 )
[node name="AreaDetect" type="Area" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0 )
+collision_layer = 4
+collision_mask = 4
+monitorable = false
script = ExtResource( 3 )
[node name="Collision" type="CollisionShape" parent="AreaDetect"]
shape = SubResource( 1 )
-[node name="normal_vis" type="MeshInstance" parent="."]
-mesh = SubResource( 7 )
-skeleton = NodePath("../Feet")
-
[connection signal="area_entered" from="AreaDetect" to="AreaDetect" method="_on_AreaDetect_area_entered"]
[connection signal="area_exited" from="AreaDetect" to="AreaDetect" method="_on_AreaDetect_area_exited"]