Parts orientation shifting

Being a developer for a railroad game, track alignment is a major thing that must be perfectly accurate. We make sure its as accurate as possible, but recently, we’ve noticed our track’s orientation shifting with a difference of about .003.

Studio

Game (Same location)

2 Likes

This could be due to the rail’s anchoring, go to the studio and check if the rail has the anchor set to true

I’ve heard of this a few times. Are you using TeamCreate? 0.001 and 0.002 studs auto movement issue

I also noticed it (probably in 2012/2013) when I was trying to make a long runway. It had a slight crown in the middle of the width of the runway (IRL this is for water drainage). In studio it was perfectly fine, but when I tested it the tiny variation of the angle from exactly 0,0,0 caused issues.

If you take the Orientation of a long Part in Studio and align it to another Part, then change the Y world axis value from 0.000 to 0.0004 (yes, 4 decimal places can be typed in!) It’ll round to 0.000 in the Properties window, but you’ll visibly see the change in orientation in the Workspace.

Yes I’m in team create. That is interesting that 4 places can be typed in but it rounds up.

Yes, the rails are anchored. If they weren’t, I would’ve found out a month ago when we ran a train over them lol.

Could you please provide a minimal repro RBXL? We suspect this is due to compression of orientation data, but we would like to verify this hypothesis.

It’s very basic.

Make a 2048 x 1 x 1 stud Part and duplicate it. Move it 2048 studs so the end aligns with the original and Color it so it’s easy to tell the difference.

Look closely at where they join. Zoom in and they should all be perfectly aligned.

Now go to Test Run and keep an eye on the edges where the Parts align to each other. You’ll likely see minor differences between the edges at the ends.

I think it becomes even more apparent if you do this at some random Orientations that aren’t 90° to World Orientation, like you’d see in the rails of a train place.

This is due to CFrame (de)compression loss of precision. We recently improved that system, but there is still a tolerance which causes subtle angle shifts; the resulting artifacts are more noticeable for large parts such as railroad tracks. To this end, we are looking into improving angular tolerances for large parts; however, the timeline for these improvements is not yet known.

1 Like

And @crosstracks892

Do you have a rough estimation of the maximum amount of deviation of the angle of Parts?
For example a 2048 stud long part would have a maximum deviation of x studs?

It’d also have to do with the end users requirement as well.

If 2 Parts are 512 studs long and joined at the ends the precision error would be 1/4 the amount of a 2048 stud Part, but I’m just wondering how much we can expect to see to gauge how short our Parts should be for this kind of thing.

1 Like

@Scottifly A 2048 stud long part at our furthest point in the map (76504.109, -19.018, -16923.725) will have an offset of about .002

A rail however, this ones size being 0.75, 1, 1946.103, has an offset of about .003

I would guess that the max offset would be somewhere around .004 or .005 if you went really far out

1 Like

So what’s your max tolerance before trains are affected?
If the max allowable is .001 studs and your deflection on a long Part is .002 studs then maybe for now you need to cut the rail length in half to decrease the deflection that can occur.