webxr_mesh_placement.zip (8.8 KB) Hi,
I am trying to import .gltf object in markerless AR, the example I refered has .babylon object and I tried replacing it with .gltf and removed all .babylon object references but the object placement is not working. Any suggestions?
Attached the 3d gltf file and also the index file.
Importing a mesh directly you will need to reference the mesh you want to place. Import returns an object full of other objects - meshes, skeletons, etcâ:
Everything is possible, of course. just create an instance instead of cloning.
VR/AR has no magic parameters for babylon. It is still the same camera style, the same transformations, the same effects. There are little to no limitations on the babylon side of things. do what you would have done as if you are creating a regular scene for desktop/mobile.
I would first suggest to stick to quaternions, if they are already there, and will be happy to see an example (maybe without the XR components, as this is not directly related to XR)
This is an exact copy of the demo from the documentation, with a different model. I donât quite see where you are trying to rotate it?
I am not sure what exactly you want to achieve, but changing the rotation of the model is the same as changing the rotation of any mesh. you can use the .rotate function, you can multiply the existing quaternion with another quaternion, you can set the quaternion to be what you want it to be.
Hit test provides you with basic rotation. If you want a specific one, you will need to define what exactly you want it to be, and set it.
Changing the Y-Axis will not work as you expect it to be. The object might already be rotated on the y axis.