Walking in straight lines impossible far from the origin

When walking at points far from the origin, your character’s movement doesn’t follow the line of travel it should. Instead it strays a bit to the left or right, making navigating tight spaces frustrating.

I’m only pressing the W and S keys, you can clearly see me drifting off to the sides though.
https://i.gyazo.com/24b778ad04b6a3de2f4d951696660a8a.gif

1 Like

What position is your character at? How far do you have to be for the problem to take effect?

I was at about X = 9000 and Y = -1000. It gets noticeable around 8000 studs from the origin.

Floating point errors, most likely.

3 Likes

That was my guess as well. Some admin at one point talked about keeping the origin around the player, but I have no idea if that is still a plan or not.

I’m not sure if that would solve anything, since the transform to get from one point of origin to the other would also be subject to floating point errors. (in other words you may be walking straight but the position of parts is slightly malformed because of transformations)

This sounds like it might be something that could be easily fix, but we need more information. Please look at the thread about reporting bugs (How to post a Bug Report) and provide as much information as possible to help us reproduce the problem in the simplest place possible.

Thanks!

-Description: walking at distances far from the origin results in your character drifting to one direction.
-Frequency: appears to occur 100% of the time.

-Repro: Move a baseplate far from the origin (8000-10000 minimum) and walk on it.
-Occurs here and most likely everywhere else: [TEMP CLOSED] Ultimate Driving: Newark - Roblox
-Screenshot: gif above
-Started: a long time ago

I remember seeing this bug before but I’m not able to reproduce it at 8000, -1000. In your OP those were the coordinates. Did you mean -10,000? Edit: Doesn’t seem to occur at 8000, -10000 either.

Those were the coordinates I was experiencing it at, perhaps there’s some other condition that it relies on?

That’s what it sounds like. You should try and repro this in studio with your game, and slowly cut away elements until you can figure out what the bug is. I believe I encountered this a while ago but I don’t know how to reproduce it. If you could figure it out that would be great!

This is definitely floating point imprecision. I’ve noticed it before. Its one of the effects of working too far away from the origin. We may be able to solve this by zeroing the math in the humanoid movement code. Another solution would be to keep the origin with the client, but that sounds like a large system change and might not even be possible.

I’ve also seen this before in one of my older projects. I can’t get a repro for it right now, but I’ll try to find one.

If I remember correctly, this also affects Body movers too. Try using a BodyGyro to rotate an object really far away too.

To really see it move both X and Z to 10000, if you’re right along one axis the drift isn’t as bad.

You can test it here

Can you show me in your place how to do it. I can’t seem to get it.

I dunno, after playing with it a bit more I’m not sure it’s movement drift but possibly something about how the camera lines up with the character or maybe controller drift.

Once you get the character moving in a straight line along one of the bricks or the studs on the base-plate it stays on that straight line You can check this by using an overhead view, but the perspective looking directly behind or in front of the character looks a little off. Messing with the FOV exasperates this a bit.

@TwentyTwoPilots what kind of controller are you using?

Mouse + Keyboard

Floating point errors get really funky when you’re 1 million studs away from the baseplate.