Rotating an object sometimes rotates by less than 90*

I’m using OSX 10.10.4 and it also happens to me.

Plus, dragging two or more parts seems to raise the parts by about 0.02, especially when placing the parts against another part.

:oops: Oh yeah, Windows 8.1 on an HP AMD FX 3.5 GHz 770K Quad core.
Does using a mouse or touch screen make any difference here? I’m using a mouse…

I’m on Windows 10 and I’m having the same issue.

I want to scream.
blob.png
Bumping this because my OCD is off the charts right now and I don’t even have OCD.

6 Likes

If you use cmdutl or another plugin that circumvents the default studio tools, rounding errors don’t happen.

¯\_(ツ)_/¯

Instead of multiplying the cframe by a 90 degree matrix, it should flip the components of the two perpendicular vectors, and make one negative. I recently updated my geometry plugin to do 90 degree rotations without matrix creep (the “Part Flip” tool):

Edit: CFrame.Angles(math.pi/2, 0, 0) wont create a perfect 90 degree matrix because radians aren’t exact (you can get values like 0.0000000437 instead of 0). Multiplying by a perfectly aligned matrix composed of 0’s, 1’s, and -1’s should be okay.

1 Like

What OS are you on and can you send a copy of the model or an image of it?

Repro.rbxl (11.4 KB)

Rotating the part in the repro file (starting at <0,-90,0>) gives rotation values of <-179.998, -44.998, -179.997> and <-0.002, -45.002, -0.003> when rotated left/right using the default rotate tool and the 1-stud increment.

OS: Windows 10. Pretty sure this happened when I was using Windows 7 as well.

That’s interesting. When/how was this part created? If I load that place and rotate it, it has problems as described, but if I set the rotation to 0,0,0 then paste the original rotation back in, it no longer has this issue.

It was created within the last week. It was created in an empty place and then pasted into an existing place, where I assume it picked up the awkward rotation when it was dragged across the floor it’s sitting on top of (which also has this issue).

I’m able to reproduce the issue from scratch as well though. Steps I took:

  • Insert that part into an empty place with a baseplate
  • Set its rotation to 0,0,0
  • Switch to no-grid mode and rotate the the part a bunch on the Y axis
  • Drag the part around on the baseplate so its rotation is reset
  • Switch to 1-stud grid and rotate the part
  • It may have awkward rotation values after rotation. If not, repeat until it does.

It isn’t a reliable repro, but it’s how I was able to get it to happen from scratch. Wouldn’t surprise me if little values of rotation inaccuracies build up over time as you continually add new parts and drag them across parts with rotation inaccuracies, causing the part to have an even larger inaccuracy whenever you rotate it. Maybe someone has a more reliable repro though where it happens pretty much instantly.

Either way though, it can be pretty devastating, because once you have one part with a “dirty” rotation in your place, all others may soon follow :(

Is this rotation one constant rotation or a large number of small rotations? Does this also happen with a default part?

Both

Yes

Insert the default part, switch to no-grid, and as you rotate (constant rotation is easiest), look at the rotation in the properties window. When you stop seeing 180 and start seeing 179.998, stop rotating and drag the part around on the baseplate to reset/snap its rotation to a normal value. Even though the part appears to have a proper rotation, as you can see in that screenshot, it has a slight offset. It took me about a minute of rotating it constantly to get that to happen.

I’ll check again, but just to make sure, what version of Studio are you using?

Version 0.244.0.74597
I updated a couple days ago I think

I’ve had this bug before. (its been present for quite a while - maybe several years?)

I’ve also noticed that these slight rotations occur when building around parts in a model. If parts are unanchored in the workspace then they will tend to have ‘brickshift’ when all the rotations mess up and the positions move slightly of the grid. The solution for that problem is to anchor the parts.
(but copying and pasting has unreliable results and often causes parts in a model to have rotations like those mentioned in this thread) I have easy repros of this if it is worth investigating.

In response to this threads specific problem I can say that those repro steps seem correct as the rotation bug sometimes takes a few rotations before it presents itself.

It took a few minutes of spinning, but I can repro this. I’ll add it to our bug list.

1 Like

I think this is to blame rather than CSG for a lot of the issues people have. CSG has issues the moment parts are awkwardly aligned, and it when the floating point problems build up and all of the parts in my place have rotational offsets of 0.03 on each axis, I can’t union them together at all – even something as simple as this:

You also end up with a ton of misalignment like this:

because even though the sizes of both parts are the same and they’re at the same position on the Y axis, the rotation offset raises one end and lowers the other.

5 years later, and it’s still not fixed. Floating point error is breaking my placement system and sometimes the rotate tool is off by more than 1 degree.

Please file a new bug report with sufficient details / that follows bug report guidelines, this one is way old and not up to standard.