Heyho,
i have a new Problem…
I will show the Dimensions of a (importet) mesh, which will works fine, if the Mesh is Rotate to a 90deg angle.
https://www.babylonjs-playground.com/#QP43YZ
But with a Rotation of 45deg or something else, it is not, what i want.
https://www.babylonjs-playground.com/#QP43YZ#1
I need that the Rotation does not Matter. It has to Act the same with and without Rotation.
Hope you can help me? ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/win10/slight_smile.png?v=9)
Mfg
Daniel
Hi @Rotzend.
Maybe using local size instead of world size, can be an option, see line 41
Or maybe calculate the dimensions before to apply the rotation, or you can check if the mesh has rotation, if it has store it in a variable, reset it to 0,0,0, calculate the dimension and aply again the rotation.
Only a few options, but stay tune I bet more will come. Cheers!
hey Thank you for Reply,
but this does not work at all…
With my merged Objects (its all meshes from the Import just Merged for Size & Center) does this not work, because it does not get rotation… (rotation has 0)
but without this, your answer work fine!
Have anyone a Solution without knowing the Rotation?
The problem is quite complex if you bake the rotation inside the mesh (as you mentioned).
From a geometry standpoint your mesh has no rotation so you need to open the mesh to “deduce” the rotation but this is really complicated. I will recommend not to lose the rotation if you can
I have solved the Problem with the Lines. But all i try does not work with the Text… ![:confused: :confused:](https://emoji.discourse-cdn.com/win10/confused.png?v=9)
I’ve tried to reproduce the Error, but it does not work…
I can’t show you the imported Object, but i can show you a part of it and i screenshoted all need Parts. Maybe you cann see a solution for that? ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/win10/slight_smile.png?v=9)
----- The Code -----
With all other deg Rotation-> all deg convertet to rad
meshRotaion: e {x: -1.5707963267948966, y: 1.5707963267948966, z: 1.0471975511965976}
![2019-07-30%2013_53_43-Webkonfigurator](https://us1.discourse-cdn.com/flex020/uploads/babylonjs/original/2X/0/0f5eff40159a49db9fd70c379f0366d69bc27611.png)
With 90deg rotation (or 0, 180, 270 and 360)
meshRotaion: e {x: -1.5707963267948966, y: 1.5707963267948966, z: 0}
![2019-07-30%2013_51_08-Webkonfigurator](https://us1.discourse-cdn.com/flex020/uploads/babylonjs/original/2X/4/4e88d46d19e4e71f80494d6f6f26f741b0df028b.png)
1 Like
Could you not reproduce in a playground with a simple box the lines and the text ???
This would help a lot.
No, unfortunately not, otherwise I would do that.
Have tried everything, but exactly the same or a similar problem does not appear.
This is really hard to help on those kind of issue without a repro, both the rotation and position looks wrong for the text plane but without the code, I can not think of anything in particular.