WIP: Try another implementation

This commit is contained in:
2025-01-23 20:24:42 +01:00
parent fe08da9d4c
commit 2577c032fd
5 changed files with 33 additions and 3 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://ccm77j5rkh21w"]
[gd_scene load_steps=7 format=3 uid="uid://ccm77j5rkh21w"]
[ext_resource type="Script" path="res://scripts/character_controller.gd" id="1_sue4n"]
[ext_resource type="PackedScene" uid="uid://bmqutwuj28san" path="res://scenes/utils/view_model_camera.tscn" id="4_al83x"]
@ -9,6 +9,11 @@
radius = 0.368364
height = 1.8
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_csl3n"]
properties/0/path = NodePath(".:position")
properties/0/spawn = true
properties/0/replication_mode = 1
[node name="Character" type="Node3D"]
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
@ -30,3 +35,6 @@ script = ExtResource("4_uwcjh")
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.0287516, -0.136104, -0.276055)
visible = false
script = null
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_config = SubResource("SceneReplicationConfig_csl3n")

View File

@ -39,8 +39,8 @@ func _on_host_pressed() -> void:
players[1] = player_info
player_connected.emit(1, player_info)
game_server_manager.add_player(1, "host")
func remove_multiplayer_peer():
multiplayer.multiplayer_peer = null