I have a cube in a 3D space. There's a camera looking at the cube in rotation (0,0,0) at the beginning.
I can swipe gesture to 1. rotate the camera around the cube, while the cube's center is the center of rotation, and 2. move the cube hoepfully..
I want to move the cube in the correct direction using the swipe vector/angle (which I already have) and camera rotation. The direction should be one of (1,0,0)/(0,0,1)/(0,1,0)
Anyone can help me understand how to do this? using vector/angle (0−360) and the camera rotation to get the direction the cube should move?
thank you!!
(I have a toggle that decides which action swipe does)
I can swipe gesture to 1. rotate the camera around the cube, while the cube's center is the center of rotation, and 2. move the cube hoepfully..
I want to move the cube in the correct direction using the swipe vector/angle (which I already have) and camera rotation. The direction should be one of (1,0,0)/(0,0,1)/(0,1,0)
Anyone can help me understand how to do this? using vector/angle (0−360) and the camera rotation to get the direction the cube should move?
thank you!!
(I have a toggle that decides which action swipe does)