# Float to angle coordinate?

I have a code that detects an angle and send out a float between 0 and 360 degrees called fAngle.

what I want to do is shoot a bullet with a rotation = to that float, so, if my player is looking up, the bullet would go up because fAngle = 90

Im new to programing so, if anyone has the answer scripted. It would be great. Because I have no idea how to use a quaternion,I have a code that detects an angle and send out a float between 0 and 360 degrees called fAngle.

what I want to do is shoot a bullet with a rotation = to that float, so, if my player is looking up, the bullet would go up because fAngle = 90

Im new to programing so, if anyone has the answer scripted. It would be great.

You don’t need to know much about quaternions, and how they work because you can use the static methods that the Quaternion struct provides, for example, `Quaternion.Euler`, which returns a rotation x on the x axis, y on the y axis, and z on the z axis, respectively.

Essentially, it’s a way of converting a euler angle (90 degrees) into a quaternion (0, 1, 0 ,0 or smt). For example:

``````float yDegrees = 90f;

// Returns a rotation 90 degrees on the y
Bullet.transform.rotation = Quaternion.Euler(0, yDegrees, 0);
``````

@GgJmGg