You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to render a phonebooth model with separate parts using gltf-part-plus.
Although all the parts of the model seem to be rendering fine the position and orientation are not correct. Can someone please help me with this?
Here is the image of how the entire model is
Here is how it looks like after using gltf parts
The position, rotation and scale of the object are coming from the backend in json format and the unity client is able to read and render it without any issue. Only Aframe is having a problem.
The text was updated successfully, but these errors were encountered:
@Gauzz unfortunately the implementation in this repo to split the gltf into parts is pretty naive and not tested against a wide range of objects. I welcome your debugging to fit your use case, or you might want to check out this project which is much more robust and offers similar utility for react-three-fiber: https://github.com/pmndrs/gltfjsx
For the first gltf node encountered in the matching part, copy its translation to the a-frame entity, and then set gltf translation to 0 0 0. This keeps the same world position for the placed gltf part's first node, while giving the A-Frame entity the value of that part from the gltf scene. However, this only works for a simple gltf with only 1 child node for each part in the scene. (Use with caution, this is not a well-tested property and might not work as expected on your model.)
I'll mark this closed for now, but feel free to open again if needed.
I am trying to render a phonebooth model with separate parts using
gltf-part-plus
.Although all the parts of the model seem to be rendering fine the position and orientation are not correct. Can someone please help me with this?
Here is the image of how the entire model is
Here is how it looks like after using gltf parts
The position, rotation and scale of the object are coming from the backend in json format and the unity client is able to read and render it without any issue. Only Aframe is having a problem.
The text was updated successfully, but these errors were encountered: