I have a 3d object(cube) and I want to move it in a single axis according to both mouse-drag (which translates to up/down/left/right) and camera rotation around that cube. (to rotate the camera around the object I followed GitHub - EmmaPrats/Camera-Rotation-Tutorial: How to rotate the camera around an object in Unity3D.).
For example if the camera rotation is (0,0,0) and the swipe direction is up the direction Vector3 I get should be (0, 1, 0).
If the camera rotation is (90,0,0) and the swipe direction is up the direction Vector3 I get should be (0, 0, 1).
You can disregard camera rotation in the Z-axis. As I dont rotate the camera around it.
How can I achieve that?
Thanks