Hi, I have a game where characters are moving; their movements are not constrained, and use floating point values.
I noticed that when I attach a camera to a player position, the other players' movements become slightly jittery (the player being followed is smooth). When the camera is fixed, there is no jitter.
My characters are moving during FixedUpdate.
During PostUpdate, I attach the camera to the main character's Transform.
Here's my system ordering:
- FixedUpdate: main player position gets updated
- Update: other players' position gets updated (interpolation)
- PostUpdate (before TransformPropagate):
- set the camera Transform to the main player's position
- draw gizmos
I am wondering:
A) what is the reason for this? I found this thread: https://www.reddit.com/r/gamemaker/comments/pcz8qc/camera_has_jittery_movement_when_the_player_is/
https://forum.gamemaker.io/index.php?threads/why-my-movement-is-jerky-for-speed-of-fraction.95757/
that suggests that it's because the camera has to render a fixed number of pixels, so fractional values in the Transform cause some issues
B) what can I do to fix this? Is this a common gamedev thing?
82K subscribers in the gamemaker community. This subreddit is dedicated to providing programmer support for the game development platform, GameMaker…
I have a 1920 x 1080 room whose camera and viewport are the same size as it.
I have an object with a single color box as its sprite and the step event for it is as follow:
"
spd = 1.6 ;
// spd = 1;
x += spd;
"
the game is run in fullscreen.
Why my movement seems to be jerky for speed of...