Hayden
Hayden5mo ago

Is movement stuttering a possible phenomenon with a known fix?

We have not changed our movement code but today there is non-graphical stuttering on our player controller. I've tried two different WiFI networks to the same effect.
5 Replies
kapa.ai
kapa.ai5mo ago
Hi @Hayden. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, there isn't a direct mention of a known fix for movement stuttering in NormalVR. However, there are a few things you could check based on the code snippets provided: 1. Check the physics timestep: In the player controller code (https://normcore.io/documentation/guides/creating-a-player-controller#making-it-multiplayer), the physics timestep is set to 60hz. If this value has been changed, it could potentially cause stuttering in the movement.
Time.fixedDeltaTime = 1.0f/60.0f;
Time.fixedDeltaTime = 1.0f/60.0f;
2. Check the movement code: Ensure that the movement code is running smoothly. The player's velocity is updated based on the target movement, and if there are any issues with these calculations, it could cause stuttering.
_movement = Vector3.Lerp(_movement, _targetMovement, Time.fixedDeltaTime * 5.0f);
velocity.x = _movement.x;
velocity.z = _movement.z;
_rigidbody.velocity = velocity;
_movement = Vector3.Lerp(_movement, _targetMovement, Time.fixedDeltaTime * 5.0f);
velocity.x = _movement.x;
velocity.z = _movement.z;
_rigidbody.velocity = velocity;
3. Check for network issues: Since you mentioned that you've tried two different WiFi networks, it's possible that the issue could be network-related. Normcore is designed to be as bandwidth and CPU efficient as possible, but if there are network issues, it could potentially cause stuttering. If none of these suggestions help, I would recommend reaching out to the NormalVR team directly. They have a Discord (https://normcore.io/discord) where you can ask questions not covered in their documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@143551436603654145> kapa.ai is still learning and improving, please let us know how it did by reacting below
maxweisel
maxweisel5mo ago
sometimes script execution order can be the cause if you have a script updating position too. and it can annoyingly change between builds with no code changes
Hayden
HaydenOP5mo ago
Thank you! Then, I suppose for example, should the player controller script execute before or after the RealtimeTransform does?
Mechabit
Mechabit5mo ago
before but RT only sends data 20 times per second by default and interpolates on the client side. I'd check there are no other scripts causing issues.