Merge pull request #37161 from simpuid/positon-gizmo-fix
Fixes transform gizmo position when node has default transform
This commit is contained in:
commit
7ed9da0a54
2 changed files with 7 additions and 2 deletions
|
@ -2419,9 +2419,10 @@ void SpatialEditorViewport::_notification(int p_what) {
|
|||
Transform t = sp->get_global_gizmo_transform();
|
||||
|
||||
exist = true;
|
||||
if (se->last_xform == t)
|
||||
if (se->last_xform == t && !se->last_xform_dirty)
|
||||
continue;
|
||||
changed = true;
|
||||
se->last_xform_dirty = false;
|
||||
se->last_xform = t;
|
||||
|
||||
VisualInstance *vi = Object::cast_to<VisualInstance>(sp);
|
||||
|
|
|
@ -482,10 +482,14 @@ public:
|
|||
Transform original; // original location when moving
|
||||
Transform original_local;
|
||||
Transform last_xform; // last transform
|
||||
bool last_xform_dirty;
|
||||
Spatial *sp;
|
||||
RID sbox_instance;
|
||||
|
||||
SpatialEditorSelectedItem() { sp = NULL; }
|
||||
SpatialEditorSelectedItem() {
|
||||
sp = NULL;
|
||||
last_xform_dirty = true;
|
||||
}
|
||||
~SpatialEditorSelectedItem();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue