I have asked one question few hours ago,but I think that question not clearly define to you that what i want.So therefore i have post again it with some pictures. please carefully see the pictures.spaceship image with rotation and position
So my question is that. [Question 1]: when i press the leftarrow button then the rotation and direction of ship should be changed like as circle (3) that show in picture,and when i released the leftarrow button it should back to its rotation that show in circle (1).
[Question 2]: when i press rightarrow button then the rotation and direction of ship should be changed like as circle (2) that show in picture,and when i released the rightarrow button it should back to its rotation that show in circle (1).
transform.position += transform.forward * Time.deltaTime * 10f;
if(Input.GetKey(KeyCode.LeftArrow))
{
//code
}
if(Input.GetKey(KeyCode.RightArrow))
{
//code
}
please help me i have stuck there :(