Hi!
I’ve created a modal operator to draw custom axis, but not sure how to properly implement constant viewport scaling.
At the moment I’m using a view_distance to calculate scale of lines:
scale = 0.085 * rv3d.view_distance
positions = [(scale, 0.0, 0.0), (0.0, scale, 0.0), (0.0, 0.0, scale)]
It works fine when axis in the world center (location (0, 0, 0)), but as soon as I move it around scaling became wrong. Code should take into account location of camera/axis but not sure how to implement it properly.
Appreciate any help!