Hello, I’m very noob at programming but I wanted to try something using some tutorials.
I basically have an object and using Android’s accelerometer it rotates, then by using two buttons, it either goes left or right. For this I use transform.Rotate (0, 0, -temp * Time.deltaTime);
and transform.Translate (speed * Time.deltaTime, 0, 0);
The program works properly and once the object has rotated, it moves in the “new x axis”, but I want it to move in the “world’s x axis”, one thats “permanent”.
As I’m very bad at programming and english as well I made a simple drawing so its easier to understand what do I want to do:
Being the upper case what happens (and should happen as it has been programmed) and the other what I want to achieve. Any suggestions on how to do this and “ignore” the rotation of the object?
Thanks for your time