Move object based on mouse movement

Hi,
I need to move a 3D object using mouse. The Object is a rectangle with one end fixed at bottom left (0,0) corner and other end free to move using mouse.
Should I rotate the rectangle object on Z with CoR at (0,0)? if yes, how can I relate move delta movement with Z angle? Please let me know if there’s any other option.
Thanks,
Dhruvesh

Hi @dhruv_er and welcome to the forum. Here are some useful links

https://doc.babylonjs.com/how_to/how_to_use_actions
https://www.babylonjs-playground.com/#UZ23UH#0
https://doc.babylonjs.com/How_To/MeshBehavior
https://doc.babylonjs.com/How_To/Gizmo
https://doc.babylonjs.com/how_to/pivots

Hope they are of use. When you can it would be really useful for you to create a playground with your object and code to move it and then tell us the issues you still have.

2 Likes