Shearing/Skewing parts

Can you skew/shear parts deterministically and does it have at least the same level of support as inverted parts?

While trying to do some triangle generation, I stumbled upon shearing which can be created by doing the following:
local a = 0.2 local b = 0.25,0,0, 0, -a, a, -1,0, 0, 0, -b, b)

Which produces:

But you can modify a and b to produce different shears (although not all work)


Uh…how did you even figure this out? :thinking:
Also, this would be really helpful with making roads.

Someone should definitely make a plugin out of this.

Seems to me like it’s just unspecified behavior,

1 Like

This is not intended behaviour and should not be relied upon. CFrames also get reconstructed whenever they get serialized (passed over any kind of network) so will not replicate properly. This also does not represent how the physics engine interprets non-orthogonal cframes so in game interactions will not feel intuitive.


I do not know much about the specifics of this, but in many situations ROBLOX will orthogonalize the CFrames of BaseParts. This does not apply to individual CFrame objects, immutable as they are, but expect this to happen to BaseParts without warning.

For some reason ROBLOX opts to not correct the “inversion” phenomenon, where the determinant is negative. I would guess that this is because CFrames with determinant -1 are rarely seen in practice—usually orthogonalization is done to correct the accumulation of floating point errors, methinks.

AFAIK Roblox will compress CFrames before sending them across a network where they are then reconstructed. I assume this compression method expects CFrames to always be orthogonal so will not preserve skewed matrices. I’d also imagine the compression method is agnostic to 1/-1 determinants which explains the odd behaviour you describe.

In the video jody7777 posted above, he was running it in Play in studio, no network involved. I don’t think it necessarily has anything to do with what you’re describing, but I could easily be wrong. A test of sorts is probably in order, but alas, I am writing this on my phone.

Another thing is this can be applied to the camera for some interesting effects such as changing the render aspect ratio, manipulating the field of view, inverting view normals (camera sees parts inside out). It can also turn objects themselves inside out while also mirroring them. A lot of these states wont save when the model is published.

Hai wunder