How To Make Character Move In Direction Its Facing

Hi, so I made a script to make the character to move just in x and z axis’. But now that I want it to move in the direction it facing I dont know how to do it. All the questions online have less complicated scripts.

Thanks, Theuns

transform.forward gives you the blue axis direction, so can use it for moving,
maybe something like:
rb.velocity = tranform.forward * currentSpeed;

5177882--513944--upload_2019-11-15_9-49-58.png

Could also use GetAxis stuff to easily access movement values (it returns -1 to 1 values, or 0 if not pressing the key)

Thanks so much! “rb.velocity = transform.forward * currentSpeed” works! It works perfectly as far as I can see!