Parts Turned Inside-Out

I did some weird cframe manipulations and it flipped a part inside out. I’m not 100% sure how to recreate it, but I can provide a place here and a model of some ‘flipped’ parts here. Both are free to take and inspect. Note that going into the game in play mode causes the part to revert to normal.

To inspect the bug, look at the parts in studio. This bug was first created in a client, so I’ve listed it as a client bug, but if it should be moved to studio bugs, please feel free to correct this. Several users were able to see it. Unfortunately, there’s not much else I can provide. Apologies in advance for the lack of information, this is one of my worse bug reports.

I know it’s cframe related because changing the part’s cframe to CFrame.new(0,0,0) fixes it. I don’t have time to look into what values cause the inversion tonight, I may have more information tomorrow.

In client:

Recreated in studio:
Inside Out

8 Likes

It’s an invalid CFrame matrix. Basically you’re asking a face to face in a negative direction. It’s a natural thing.

10 Likes

ROBLOX likes to give users a lot of freedom where available. Part of that freedom is giving users the ability to define a CFrame of an object. A Coordinate Frame consists of 12 floating point values:

Position X, Y, Z
Rotation Matrix Rxx Rxy Rxz
                Ryx Ryy Ryz
                Rzx Rzu Rzz

While position can have a magnitude of anything and it would make physical sense, Rotation Matrices have to meet certain criteria for them to make sense (such as having a Determinant of 1). So if a user starts manually messing with those 9 values without fully understanding what they mean, there is not much we can do on the sanitation side of things to prevent them from creating crazy transformations.

TLDR: Not a bug. With great power comes great responsibility.

7 Likes

The freedom is limited though - we orthonormalize the matrix but as a result the determinant can be 1 and -1 - we don’t fix the inverted rotation matrices (aka rotation + scale=-1), which is what happens in this case.

We had issues with this flipping before, so do not consider it as a feature that you can rely on - we can decide to correct non-rotation CFrames for parts at any point in time.

8 Likes

@zeuxcg, what would the change be most likely to be? Failure to resolve, ‘flipping’ back to the way most parts look, or something else?

If we make a change to this behavior, it would flip the parts back. We aren’t currently planning on doing this but it might happen in the future.