You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not reproducible in v4.2.1.stable.official.b09f793f5
System information
Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 Ti (NVIDIA; 31.0.15.5176) - Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (8 Threads)
Issue description
I have a multiplayer setup where characters have limited vision using the MultiplayerSynchronizer's visibility settings.
Characters have two MultiplayerSynchronizers:
The main "Sync" MS is for the server to sync character properties to clients
The second "Motion" MS syncs its own properties (target_position) from the client to the server, for movement interpolation
The "NetworkClientScope2D" and "NetworkScopedObject2D" are Area2D nodes that detect when a character is in range and update the "Sync" MP's visibility for the corresponding peer accordingly.
In Godot 4.2.1, this works as expected.
The Host (on the left) always sees the client.
The client (on the right) only sees the host when they're in range:
In Godot 4.2.2, the visibility setting works once. Upon exiting the visibility range, and re-entering the Area2D, the client can no longer receive updates from the "Motion" MS.
Instead, the client will report error messages for each synchronization update:
E 0:00:21:0159 get_cached_object: ID 3 not found in cache of peer 1.
<C++ Error> Parameter "oid" is null.
<C++ Source> modules/multiplayer/scene_cache_interface.cpp:278 @ get_cached_object()
and, as a result:
E 0:00:21:0167 on_delta_receive: Ignoring delta for non-authority or invalid synchronizer.
<C++ Error> Condition "true" is true. Continuing.
<C++ Source> modules/multiplayer/scene_replication_interface.cpp:783 @ on_delta_receive()
I believe this may be related to PR 87190 ([MP] Handle cleanup of "scene cache" nodes)
Steps to reproduce
I recommend enabling Visible Collision Shapes from the debug menu
Start one as host, and have the other join as client (The MRP is set up to host and connect to localhost over WebSocket).
Move the players towards each other (order does not matter) until they're in visibility range.
Note how both characters correctly sync their positions
Move the character apart, so they're no longer in visibility range
Move the characters back together
In Godot 4.2.1, this works fine.
In Godot 4.2.2 (starting with RC1), the host character can no longer synchronize its position to the client. Instead, the client will report get_cached_object errors.
Tested versions
System information
Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 Ti (NVIDIA; 31.0.15.5176) - Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (8 Threads)
Issue description
I have a multiplayer setup where characters have limited vision using the MultiplayerSynchronizer's visibility settings.
Characters have two MultiplayerSynchronizers:
target_position
) from the client to the server, for movement interpolationThe "NetworkClientScope2D" and "NetworkScopedObject2D" are Area2D nodes that detect when a character is in range and update the "Sync" MP's visibility for the corresponding peer accordingly.
In Godot 4.2.1, this works as expected.
The Host (on the left) always sees the client.
The client (on the right) only sees the host when they're in range:
In Godot 4.2.2, the visibility setting works once. Upon exiting the visibility range, and re-entering the Area2D, the client can no longer receive updates from the "Motion" MS.
Instead, the client will report error messages for each synchronization update:
and, as a result:
I believe this may be related to PR 87190 ([MP] Handle cleanup of "scene cache" nodes)
Steps to reproduce
I recommend enabling Visible Collision Shapes from the debug menu
Minimal reproduction project (MRP)
https://github.com/graydoubt/422-mp-regression
The text was updated successfully, but these errors were encountered: