- Home /
camera rotation
i am facing one problem with Input.acceleration. if i rotated the camera in y axis in runtime then my Input.acceleration work opposite direction.how can Move the Object to Camera respective.
var dir : Vector3 = Vector3.zero;
dir.x = -Input.acceleration.y;
dir.z = Input.acceleration.x;
Could you explain what you're trying to do in more detail?
i want to create two button left and right movement of the camera if i press left button camera rotate 180 degree in left side in y axis and other buttton work same in right side but mobile acceleration work according to the moobile direction it should not work in opposite direction when we rotate the camera.
Still not 100% clear here. So, what you're trying to say is that the left button and right button rotate the camera in the wrong direction?
Your answer
Follow this Question
Related Questions
Move the Object to Camera respective. 1 Answer
I need help with camera movement and rotation. 1 Answer
"Perfect" Free Rotation Method? (like Blender) 2 Answers
How to lock Y Rotation 3 Answers