mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
parent
b44cb4e3b9
commit
d28763a4c1
138 changed files with 1203 additions and 1194 deletions
|
|
@ -790,13 +790,13 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from) {
|
|||
|
||||
VS::get_singleton()->instance_set_base(mesh_instance, mesh->get_rid());
|
||||
|
||||
Rect3 aabb = mesh->get_aabb();
|
||||
AABB aabb = mesh->get_aabb();
|
||||
Vector3 ofs = aabb.position + aabb.size * 0.5;
|
||||
aabb.position -= ofs;
|
||||
Transform xform;
|
||||
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.125);
|
||||
xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.125) * xform.basis;
|
||||
Rect3 rot_aabb = xform.xform(aabb);
|
||||
AABB rot_aabb = xform.xform(aabb);
|
||||
float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5;
|
||||
if (m == 0)
|
||||
return Ref<Texture>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue