Moving object to according where camera is looking

I have a player and a camera. The camera can rotate freely.

What I want is to move player forward where camera is looking, not forward in world axes.

How can I do that? Thanks

You probably want Camera.main.transform.forward

if the camera is on a pivot, just make sure the player object is a child of, or is that pivot.

However, doing this will not allow rotation around the player object without further work.

Hope this helps!