i wanna make a 2d game in unity where player can rotate in right or left direction for android ..i have been looking for tutorials but it didn't helped me out..
any help would be appreciated. .thankyou
i wanna make a 2d game in unity where player can rotate in right or left direction for android ..i have been looking for tutorials but it didn't helped me out..
any help would be appreciated. .thankyou
Well, I think a little bit of math might help :
float rad=45*DEGTORAD; // convert degree to radians, 45 is for example you can put any angle
float dx=sin(rad);
float dy = cos(rad);
// player moves along the direction of dx,dy vector , define posx , psy as initial position and update them
posx+=dx;
posy+=dy;
// there you go