Angle to Velocity

Idk if this has already been made, please link it if it has. I’m looking for a way to convert a 30 degree angle into a movement of velocity in that direction. I also need this for impulse.

1 Like

Are you wanting the angle to make the velocity? Or you want velocity in that direction? You could use the rotate behavior to make the object point in a specific direction, then have another input as the velocity to allow the object to move.

If you did that, I would make the base object separate from the visual object, so the visual can attach or extract the base and have its own animations and other code, that way it doesn’t rotate around like the base would. That is if you didn’t want the object to spin around.

1 Like

I want velocity in an angular direction, without forwards.

Like you want something to rotate at a set speed? Or rotate to a specific degree measure?

1 Like

Basically, I want my character to impulse in the direction of an object.

do cos(Angle)*magnitude for the x velocity and
sin(Angle)*magnitude for the y velocity

*Note the angle must be in radians
To convert from degrees to radians do
(Angle / 180 * Math.PI)


I haven’t taken algebra 2 yet, so might i ask, what is magnitude in this equation? Is it the strength multiple of the impulse?

Basically, yeah. Just how strong you want the impulse to be, and it should be the same for both equations

@DraftyScienceCoat75 is right, but I also have an example for it.


what DON’T you have an example for? lol

Here’s a library, I’m currently redoing it.

1 Like