Convert angle to Vector?

The problem that I have a player and I need to convert the player’s z rotation into a vector2, which will be normalized and then I will multiply the vector by a velocity factor, then I’ll apply the vector as a force to the player’s Ridigdbody2D.

Essentially I’m not sure how to turn the angle into a vector. I was just going to use some trig functions to get the rise/run, but that wouldn’t work for angles greater than 90 degrees.

Anybody have any ideas?

Try this:

var vForce = Quaternion.AngleAxis(angle, Vector3.forward) * Vector3.right;

You likely want to normalize the result before applying the force. This code assumes you are using Vector3.right as your zero angle.

Why not just use your player’s up, forward, or right vector?

rigidbody.velocity = transform.up * 10;