Gizmos do not really preserve screen size

Hi,
I noticed that gizmos do not correctly preserve the size on the screen. You can notice that if the aspect ratio of the screen is big enough and you move a gizmo to the edge of the screen. It gets bigger.

This happens because the whole distance from the camera to the gizmo is taken into account and not the distance from the camera plane to the gizmo (a perpendicular from this plane).

And this doesn’t work at all with ORTHO-cameras. The math in this case should be simpler.

I’ve prepared a PR to fix that.
You can check the “before” and “after” videos there. Only perspective camera is shown.
I compared this behavior with other 3D-editing software and I believe it is correct.

pinging @Cedric

Marking as solved as PR was merged

1 Like