WIP: Some updates

This commit is contained in:
Nikolai Rodionov 2025-02-09 18:00:14 +01:00
parent e922911f92
commit 275d697f60
Signed by: allanger
GPG Key ID: 09F8B434D0FDD99B
2 changed files with 8 additions and 7 deletions

View File

@ -13,10 +13,11 @@ func _ready() -> void:
pass # Replace with function body.
func _process(delta: float) -> void:
func _physics_process(delta: float) -> void:
set_multiplayer_authority(multiplayer.get_unique_id())
if owner_placeholder:
global_transform = owner_placeholder.global_transform
#global_transform.origin = owner_placeholder.global_transform.origin
global_transform.origin = global_transform.origin.lerp(owner_placeholder.global_position, delta * 10)
global_rotation = owner_placeholder.global_rotation
# Set the owner placeholder, so the characters can send the requests to a node
# it depends on

View File

@ -6,24 +6,24 @@
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_2dhi2"]
properties/0/path = NodePath("SharedNode:position")
properties/0/spawn = false
properties/0/spawn = true
properties/0/replication_mode = 1
properties/1/path = NodePath("SharedNode:rotation")
properties/1/spawn = true
properties/1/replication_mode = 1
properties/2/path = NodePath(".:owner_id")
properties/2/spawn = true
properties/2/replication_mode = 1
properties/2/replication_mode = 2
properties/3/path = NodePath(".:input_direction")
properties/3/spawn = true
properties/3/replication_mode = 1
properties/3/replication_mode = 0
properties/4/path = NodePath(".:jumping")
properties/4/spawn = true
properties/4/replication_mode = 2
properties/4/replication_mode = 0
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_8la7e"]
properties/0/path = NodePath("SharedNode:position")
properties/0/spawn = true
properties/0/spawn = false
properties/0/replication_mode = 0
[node name="ServerNode" type="Node3D"]