diff options
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r-- | editor/editor_plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 73ea4fb5ef..99b917107e 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -30,6 +30,7 @@ #include "editor_plugin.h" +#include "editor/editor_command_palette.h" #include "editor/editor_export.h" #include "editor/editor_node.h" #include "editor/editor_paths.h" @@ -103,7 +104,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh RS::get_singleton()->instance_set_transform(inst, mesh_xform); AABB aabb = mesh->get_aabb(); - Vector3 ofs = aabb.position + aabb.size * 0.5; + Vector3 ofs = aabb.get_center(); aabb.position -= ofs; Transform3D xform; xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI / 6); |