People who code: we want your input. Take the Survey

New answers tagged


If you have an object whose transform is already rotated the way you want on the z axis (and not rotated on the x and y), then this is as simple as: Vector2 direction = -transform.up; Otherwise, you can construct the rotation you want and rotate the "down" vector by it: Vector2 RotationToVector(float degrees) { Quaternion rotation = ...

Top 50 recent answers are included