0 votes

Please take a look at the video below

https://www.dropbox.com/s/5b6yvgtimwd5s8t/2022-09-07%2000-03-38.mp4

When the spaceship starts moving, the jitter begins.

Let me explain how I do this:

  1. Characters and spaceships are siblings. Characters are rigidbodies and spaceship is kinematicbody.
  2. In every physics frame, I change characters' transforms when they are inside spaceship
  3. Network tick rate is 30fps. when the tick rate timer is timedout, client sends character transform to the server and server broadcast to all clients about puppet information including other characters and spaceship.
  4. Spaceship belongs to peer 1. For the sake of development convenience, the first character is also peer 1. the other character is network master of its own node only.

I tried below before I come here to ask and none of them works:

  1. Put characters inside spaceship so I don't change passenger's transform manually. Jitter still exists.
  2. Using tween. Tween makes movement more fluent but don't fix jitters as characters position changes back and forth. Tween only make the back-and-forth-move more fluent but doesn't remove the back-and-forth-move. Tween is used in the video.
  3. send character transform and spaceship transform in single rpc call and let the client handle the data in single frame. This doesn't help either.

The only way I know, to remove the jitter when the spaceship starts moving, is to not move it at all. When spaceship doesn't move, the jitter doesn't show.

How can I remove the jitter, or this is an engine problem? Do I have to change the gameplay?

Godot version 3.5 stable
in Engine by (37 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.