Rotate mesh in web AR

Another question how rotate mesh in web AR using touch swipe events

Hi Krishna_Kishore,

I don’t think this should be any different from rotating a mesh using the touchscreen under any other circumstance. All you should have to do is observe touch events (through browser APIs or the Babylon pointer system, for example), then change the rotation of the object based on the inputs you observe. If you’re looking for a place to start, I’d go to the Simple Drag Example Playground from the doc page I linked above and see if you can get it to change the objects’s rotations instead of their positions. Hope this helps, and best of luck!

1 Like

but in web AR, ,mesh.rotatation is not working, we have to work with Quaternion

what to rotate mesh based on Quaternion

A quaternion is just another way of representing your rotation without suffering from the euler gotchas.

You can have a read here: Rotation Quaternions | Babylon.js Documentation

1 Like