Avatar lagging behind me?
I moved into a new scene where if I move really fast my avatar lags behind, any clue where that might be happening?
6 Replies
Hi @Alix Ollivier. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Avatar lagging behind your movements in a Normcore-powered scene is typically caused by network synchronization delays or interpolation settings. Here are the most common reasons and what you can check:
1. Network Interpolation Delay: Normcore uses interpolation to smooth out network updates. If your avatar is lagging behind, it may be due to the interpolation delay being too high. This is especially noticeable when moving quickly, as the system is always showing a slightly older position to hide network jitter. You can look into adjusting the interpolation settings or the delay if your use case allows for it. The InterpolationDelay class is responsible for this, and you may want to review how it's being used in your avatar setup.
2. Datastore Update Rate: By default, Normcore synchronizes model properties at 20 Hz. If your avatar's position is being updated through a custom model property, this update rate might not be fast enough for rapid movement. For smoother animation, you can use the
[Interpolate] attribute on frequently updated properties, which will create an interpolated property for smooth transitions between updates. This is the same technique used by built-in components like RealtimeTransform. Make sure your avatar's movement is being synchronized using a method that supports interpolation if you need smooth, real-time updates see more.
3. RealtimeTransform Smoothing: If you are using the RealtimeAvatar system, the RealtimeTransform component has a "Smoothing" option. This helps smooth out remote player movement but can introduce a slight delay for local avatars if not configured correctly. Ensure that smoothing is only applied to remote avatars, not the local one, to avoid unnecessary lag for the local player RealtimeTransform docs.
4. Ownership: Make sure your client owns the RealtimeTransform component for your local avatar. If not, your movements will be subject to network round-trip time, causing visible lag RealtimeTransform ownership.
If you have recently changed scenes or made changes to how avatars are instantiated, double-check that the correct ownership and interpolation settings are being applied to your local avatar in the new scene.
If after checking these areas the issue persists, it may be worth profiling the network and update rates, or reaching out to the Normcore team for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@185325614775926784> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@Normcore Assistant on one scene, it works fine, and on the new scene it's broken
Let me check the knowledge base for you again. One moment! :books:
----------------------
If your avatar works fine in one scene but lags behind in a new scene, this usually points to a difference in how the avatar prefab or synchronization components are set up between the two scenes.
Here are the most likely causes based on Normcore documentation:
1. RealtimeAvatarManager and Prefab Setup: Make sure the new scene’s avatar prefab is set up identically to the working scene. The prefab must include a
RealtimeAvatar component on the root, and the RealtimeAvatarManager should reference the correct local avatar prefab. If the prefab or its references are different, synchronization may not work as expected, causing lag or stutter Avatars.
2. RealtimeTransform Smoothing: Check if the "Smoothing" option on the RealtimeTransform component is enabled for your local avatar in the new scene. Smoothing should only be applied to remote avatars; if it’s enabled for the local avatar, it can cause visible lag for your own movements RealtimeTransform.
3. Ownership: Ensure your client owns the RealtimeTransform component for the local avatar in the new scene. If not, your movements will be delayed as they wait for network updates from the true owner RealtimeTransform ownership.
4. Prefab Instantiation: Double-check that the avatar prefab is being instantiated from a Resources folder or via the correct addressable method, as required by Normcore. If the prefab isn’t loaded or referenced properly, the synchronization pipeline may not function correctly Meta Avatars Customization.
If everything is set up the same as the working scene and the issue persists, there may be a subtle difference in how the avatar or its components are configured in the new scene. Carefully compare the setup between scenes, focusing on the points above.
If you still can’t find the cause, the knowledge sources recommend reaching out to the Normcore community for further troubleshooting.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@185325614775926784> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
For anyone who has this issue in the future, I accidentally put my root as XR Origin instead of my Player Body in RealtimeAvatarManager.