Player view and world models
This commit is contained in:
parent
79ff5b4f62
commit
b601b9430e
4 changed files with 24 additions and 1 deletions
|
|
@ -1,4 +1,8 @@
|
||||||
Current plans:
|
Current plans:
|
||||||
|
^ Add world model
|
||||||
|
^ Separate Viewmodel
|
||||||
|
^ Hide view from players and world from player
|
||||||
|
Rework player states
|
||||||
Player teams
|
Player teams
|
||||||
Team spawns
|
Team spawns
|
||||||
Bomb
|
Bomb
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=15 format=3 uid="uid://dpsr6ug3pkb40"]
|
[gd_scene load_steps=17 format=3 uid="uid://dpsr6ug3pkb40"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scripts/player/player.gd" id="1_g2els"]
|
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scripts/player/player.gd" id="1_g2els"]
|
||||||
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://scripts/player/crosshair.gd" id="3_dqkch"]
|
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://scripts/player/crosshair.gd" id="3_dqkch"]
|
||||||
|
|
@ -6,7 +6,9 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://c3hg4ux4j76j2" path="res://models/molikman_hands.glb" id="4_dqkch"]
|
[ext_resource type="PackedScene" uid="uid://c3hg4ux4j76j2" path="res://models/molikman_hands.glb" id="4_dqkch"]
|
||||||
[ext_resource type="Script" uid="uid://6c14qse4vnra" path="res://scripts/player/player_raycast.gd" id="4_fjrip"]
|
[ext_resource type="Script" uid="uid://6c14qse4vnra" path="res://scripts/player/player_raycast.gd" id="4_fjrip"]
|
||||||
[ext_resource type="Script" uid="uid://bmecgup3kcua7" path="res://scripts/weapon_system/weapon_system.gd" id="4_qlg0r"]
|
[ext_resource type="Script" uid="uid://bmecgup3kcua7" path="res://scripts/weapon_system/weapon_system.gd" id="4_qlg0r"]
|
||||||
|
[ext_resource type="Script" uid="uid://dd5mp72dq43v6" path="res://scripts/multiplayer/own_visibility_toggle.gd" id="4_smehm"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djwjl8xll53vn" path="res://scenes/weapons/starting_pistol.tscn" id="7_fjrip"]
|
[ext_resource type="PackedScene" uid="uid://djwjl8xll53vn" path="res://scenes/weapons/starting_pistol.tscn" id="7_fjrip"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c2r8dbudbs7l3" path="res://models/molikman_ingame.glb" id="8_smehm"]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_u8vuu"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_u8vuu"]
|
||||||
|
|
||||||
|
|
@ -125,6 +127,13 @@ animation_player = NodePath("AnimationPlayer")
|
||||||
stand_up_area = NodePath("StandArea")
|
stand_up_area = NodePath("StandArea")
|
||||||
CROUCH_TIME = 0.1
|
CROUCH_TIME = 0.1
|
||||||
|
|
||||||
|
[node name="molikman_ingame" parent="." instance=ExtResource("8_smehm")]
|
||||||
|
transform = Transform3D(0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 1.1793717, 0)
|
||||||
|
|
||||||
|
[node name="VisibleEnabler" type="Node" parent="molikman_ingame"]
|
||||||
|
script = ExtResource("4_smehm")
|
||||||
|
visible_for_others = true
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||||
shape = SubResource("CapsuleShape3D_u8vuu")
|
shape = SubResource("CapsuleShape3D_u8vuu")
|
||||||
|
|
@ -140,6 +149,9 @@ compensation_delay = 0.2
|
||||||
[node name="molikman_hands" parent="Camera3D" instance=ExtResource("4_dqkch")]
|
[node name="molikman_hands" parent="Camera3D" instance=ExtResource("4_dqkch")]
|
||||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, -1, 0)
|
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, -1, 0)
|
||||||
|
|
||||||
|
[node name="VisibleDisabler" type="Node" parent="Camera3D/molikman_hands"]
|
||||||
|
script = ExtResource("4_smehm")
|
||||||
|
|
||||||
[node name="Skeleton3D" parent="Camera3D/molikman_hands/Hands" index="0"]
|
[node name="Skeleton3D" parent="Camera3D/molikman_hands/Hands" index="0"]
|
||||||
bones/1/position = Vector3(0.16239367, 0.7620353, -0.22555673)
|
bones/1/position = Vector3(0.16239367, 0.7620353, -0.22555673)
|
||||||
bones/1/rotation = Quaternion(-0.013897974, 0.25458142, 0.93291974, 0.25427514)
|
bones/1/rotation = Quaternion(-0.013897974, 0.25458142, 0.93291974, 0.25427514)
|
||||||
|
|
|
||||||
6
scripts/multiplayer/own_visibility_toggle.gd
Normal file
6
scripts/multiplayer/own_visibility_toggle.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
@export var visible_for_others: bool = false
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
get_parent().visible = (get_multiplayer_authority() != multiplayer.get_unique_id()) == visible_for_others
|
||||||
1
scripts/multiplayer/own_visibility_toggle.gd.uid
Normal file
1
scripts/multiplayer/own_visibility_toggle.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dd5mp72dq43v6
|
||||||
Loading…
Add table
Add a link
Reference in a new issue