Editor units accuracy

Everytime I use the exact numeric values for rotating or scaling an object the editor changes it a bit. If I type 10 it ends up like 9.1314941… Does it matter or I should not pay attention to it?

Thanks.

Hmm, where is that happening, just in the level editor? The number should only be different than what you enter if the number can’t be represented as a floating point number due to numerical imprecision, which that much of a change definitely is not.

Cheers,
Nick

Fungy, I am unable to reproduce this. Can you provide exact repro steps?

For rotation, I wouldn’t worry about it. What the editor is doing when you enter a new value is it’s creating a new delta quaternion rotation and applying that, and then it extracts the euler angles and sets those to the rotation value we save and you see. That’s likely what you’re seeing, due to the way quaternion math works, the euler values may not look at all like what you had before after the new rotation is applied, but it should still represent the same rotation.

We’ve got some squishy plans that might improve the user experience in the future, like storing the user entered rotation. Out of curiosity what numbers did you have for the rotation?

For scale though those values should remain the same, unless you have the scale locked, which then it effects the other values, scaling them up by the same ratio.

Yes, this happens only in the level editor to me. After quick tests it turns out this happens only with rotation values, the scale and move is ok.

This happens with numbers: 3,9,10,11,14,15,16,17,18,19,20… almost with every number.

I just want to be sure this is normally and doesn’t affect the light system or anything else.

Anyway, here how this looks (sorry for a big picture):

Well, I posted a screenshot above and here’s repro steps:

  1. Add a static mesh on the level
  2. In the Transform section enter a rotation value, for example 3,9,10,20,40
  3. After I press “Enter” the resultin value is not what exactly what I typed (10 is 9.99999 or 50 is 49.999996)

had same problem: [REQUEST] Gui float values snapping/precision - Feedback for Unreal Engine team - Unreal Engine Forums

I was able to repro. The difference you’re seeing are floating point rounding errors that occur when converting your input value to a quaternion and back. We are already aware of this problem and planning to adjust this part of the code so that the transformation data is stored in a way that does not alter the user’s input.

For all practical purposes, the difference should not cause any problems, although it may trigger some OCD reflexes in some :slight_smile:

Still have the problem in 2019 with UE 4.21

I think I am also facing this issue. Did you get any proper solution?

Hey, this is still an issue on UE 4.22.3 I try to scale an object from feet to cm by setting the scale to 30.48, and the value comes out at 30.4799995.

I opened UE 4.19 and this is not an issue.

Thanks