Move object forward with rotation

I’m trying to move an object forward (in the direction its facing), I’m having a difficult time with it. I feel like this should be much easier that I’m making it out to be, but when I look up how to do it, I can’t find anything that is doing what I’d like.

I have a character facing a direction. When he rotates left or right, he moves forward base on that (his z rotation). The goal is to make him always move “forward” at a constant rate. So I guess what I’m trying to figure out is what his x & y velocity should be based on his z rotation.

Y-hello there,

if you search on YouTube there are plenty of resources that handle 2D movements, both with Rigid Bodies and with Transforms.

https://www.youtube.com/results?search_query=unity+2d+character+movement

Hope this helps!

7147253--855356--Screenshot 2021-05-17 091000.jpg

Somerhing like this? It considers the rotation of the gameobject

Here is a nice example of different ways to move objects and how it affects them. Even if it is 3D the logic still applies (for most if not all) to 2D