Hi im a beginner to Unity3d and i need help with moving object when pressed a button. just take a look at my codings.
//Moving Object Forward
if (Input.GetAxis(“Up”)) {
transform.Translate(Vector3.forward, Space.Self);
}
}
//Rotating Object Leftwards
if (Input.GetAxis(“Left”)) {
transform.Rotate(Vector3(30 * Time.deltaTime, 0, 0), Space.Self);
}
}
The movement forward is fine. but after i rotate, the movement is not forward and the player is moving to the standard axis, not the axis of the player. Help needed. I’m a beginner so please help me! And why isn’t the Space.Self working?