Part rotations being lost / rounded

Reproduction Steps
Ever since ~2 weeks ago parts have been losing small orientation in Play / Live. Their orientation does not get broken in Studio edit.

If you make a new place and set the orientation of the SpawnLocation to (0, 0.05, 0) you will see it get reset to (0,0,0) when entering Play mode.


Expected Behavior
Parts should maintain their rotations.

Actual Behavior
Parts are reset to 0,0,0 causing seams to appear between them

Workaround
No, this is critical

Issue Area: Engine
Issue Type: Display
Impact: Critical
Frequency: Constantly
Date First Experienced: 2022-01-22 00:01:00 (-08:00)

1 Like

Thanks for the report, is the part anchored?

1 Like

Yep, the parts are anchored. Somewhere the rotation information is getting lost between Edit and Play/Live Game. The fact it happens in a live game makes me think a plugin couldn’t be responsible so it must be something like how Orientation is being serialized / deserialized.

This bug happened right around when the changes to floating points were made.

I assure you, the IEEE 754 floating-point specification has not been changed recently. Floating-point numbers work exactly the same way they have for decades.

I don’t think it changed. But we noticed this right around the same time they changed how floating point → string conversion were done, so it’s possible something is being lost in type conversions.

2 Likes

I don’t think it’s being converted to string and back. Maybe they just have a rounding error somewhere or are putting it through some lower precision type. Or they’re packing it weirdly like BitBuffer does for example.

I think i am experiencing this in a weird way. whenever i change any character live (i.e add a hair/change their size), (i havent touched my scripts and it was fine a week ago), some of their body parts go missing. sometimes for other people, sometimes for only you. (I think they default back to (0,0,0) )

I tried our your repro steps and had the exact same issue. 0, 0.1, 0 did save tho

Thanks, I checked this out and the repro you gave is not new behavior (and is expected). The relevant code hasn’t been changed in at least a couple years.

What’s going on is (to save bandwidth) we compress CFrame properties when we replicate them. So you don’t get full precision if the CFrame is sent over the network. If you do a server + 1 player test in Studio, you’ll see that the part on the server has the orientation (0, 0.05, 0) and the part on the client has the orientation (0, 0, 0). The compression does not give uniform precision for the orientation, it’s a bit less precise if the orientation is very close to an axis. That’s why, for example, an orientation of (0, 0.11, 0) will replicate to the client but an orientation of (0, 0.01, 0) will show up as (0, 0, 0) on the client.

I checked some older versions of Studio (500 and 505) to double check this wasn’t some subtle new change in behavior that was indirectly introduced, and the result is the same. What did you see 2 weeks ago that led you to believe this was the root cause? Did part of one of your experiences break? It’s possible it’s a different issue.

1 Like

I think you might be experiencing something else, I just saw this report which sounds like your issue.

Gotcha - if it’s not new behavior then we will work around it!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.