I have been stuck on this issue for a while now. Any help would be greatly appreciated.
So, I’m currently importing a glb model into my scene. The model can have multiple meshes with different scales. In my scene I want to be able to pick that model and move it around using Gizmos because of this I have used the BoundingBoxGizmo.MakeNotPickableAndWrapInBoundingBox option to wrap my meshes.
Now the issue is that when I use that option it changes the scale values of my model. It usually wouldn’t be a problem but I want to keep the original scale values.
To explain my use case, I want to give the user the ability to create a full scene with multiple 3d assets and be able to scale, rotate, and position them anywhere in the scene. After which, I want to view the same scene the user created in Unity. To do that I created a JSON that keeps a record of where everything is in a scene.
In Unity, I parse that JSON object and try to replicate the scene. I was able to get everything working and showing correctly other than the glb models uploaded by the user during the creation of the scene.
The position and rotation are shown correctly in Unity but their scale is always random.
I have created a sample playground to show that when wrapping a mesh in Bounding Box Gizmo its scale is changed.
I was just facing the same issue - Check out the last link in this thread:
The method there of using asset container to load the GLB and then duplicating an instance of it, and putting a bounding box around it - works for the scenario you mention. And being sure to set any animations to frame0 before applying the bounding box.
Is it possible to do the same thing but keep the original scale of the object?
As I explained earlier, I’m only using it to wrap my glb asset into an object so I can pick it up using pointer events. If there is another way to pick the whole glb asset or maybe keep the original scale of the object that would be great.
Because I want to keep the original scale values of the object.
So, I want to give the user the ability to create a full scene by uploading different assets(glb model). The user can then scale, move and rotate each object in the scene. When the user is done I save the scene in a json. The json contains the asset(glb model) cdn location plus its position, scale, and rotation.
After which I want to use the same json to load the scene in a unity(3d engine) app. Currently, everything is working fine except for the 3d asset scale. I’m able to replicate the whole scene in unity, the rotation and position are perfectly fine but the scale of the 3d assets is not correct.