Merge pull request #20848 from Calinou/improve-3d-manipulator-gizmo
Improve the 3D manipulator gizmo
This commit is contained in:
commit
892667878a
1 changed files with 6 additions and 6 deletions
|
@ -2824,7 +2824,7 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
|
|||
dd = 0.0001;
|
||||
|
||||
float gsize = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_size");
|
||||
gizmo_scale = (gsize / Math::abs(dd));
|
||||
gizmo_scale = (gsize / Math::abs(dd)) * MAX(1, EDSCALE) / viewport_container->get_stretch_shrink();
|
||||
Vector3 scale = Vector3(1, 1, 1) * gizmo_scale;
|
||||
|
||||
xform.basis.scale(scale);
|
||||
|
@ -4517,9 +4517,9 @@ void SpatialEditor::_init_indicators() {
|
|||
nivec * 0.0 + ivec * (GIZMO_ARROW_OFFSET + GIZMO_ARROW_SIZE),
|
||||
};
|
||||
|
||||
int arrow_sides = 6;
|
||||
int arrow_sides = 16;
|
||||
|
||||
for (int k = 0; k < 6; k++) {
|
||||
for (int k = 0; k < arrow_sides; k++) {
|
||||
|
||||
Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
|
||||
Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
|
||||
|
@ -4603,10 +4603,10 @@ void SpatialEditor::_init_indicators() {
|
|||
ivec * 0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
|
||||
};
|
||||
|
||||
for (int k = 0; k < 32; k++) {
|
||||
for (int k = 0; k < 64; k++) {
|
||||
|
||||
Basis ma(ivec, Math_PI * 2 * float(k) / 32);
|
||||
Basis mb(ivec, Math_PI * 2 * float(k + 1) / 32);
|
||||
Basis ma(ivec, Math_PI * 2 * float(k) / 64);
|
||||
Basis mb(ivec, Math_PI * 2 * float(k + 1) / 64);
|
||||
|
||||
for (int j = 0; j < 4; j++) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue