Finding forward in 2D Rigid Body?

So I am making movement in my game that replicates the movement in Asteroids. I can get it to work with a 3D rigid body using (camera looking top down):

public float thrust = 100.0f;
public float rotate_speed = 60.0f;

if (Input.GetKey(KeyCode.UpArrow)){
rigidbody.AddForce(transform.forward * thrust * Time.deltaTime);
}

if (Input.GetKey(KeyCode.LeftArrow)){				
transform.Rotate(0.0f,-rotate_speed * Time.deltaTime,0.0f);
}

if (Input.GetKey(KeyCode.RightArrow)){			
transform.Rotate(0.0f,rotate_speed * Time.deltaTime,0.0f);
}

If I try and replace most of this with “2D” code on a sprite and a rigidbody2D, I can’t figure out the solution. I guess my main problem is how to “AddForce” “forward” in 2D. Thanks.

In 2D, you want to do your rotation in the Z-axis (third field), and instead of “.forward” use “.up” or “.right” (depending on how your Sprite is facing). You can’t use “.forward” since in 2D that’s basically pointing at the camera.