# The problem described with image in topic

kustrle
[PLAIN]http://img842.imageshack.us/img842/336/angleqj.png [Broken]
Lets say that the body has force F in the direction B(β).
What is the formula that would let me calculate X velocity and Y velocity of the body?
The formula should include all three factors, A(α), B(β), and F (force of the body)

I've encountered this problem while developing computer game. Thanks for help!
~Kustrle

Last edited by a moderator:

Vorde
Create a right triangle with F as the hypotenuse and one side being the X Velocity and the other side being the Y velocity. Then if you know the angle of the object, you can use right-angle trig to figure out the other sides.

Last edited:
kustrle
I can only include 1 angle (α) and force in right triangle (other angle will always be 90-α).

Vorde
You only need one angle and one side.

kustrle
For the angle I take γ=α-β
From that I get that X velocity = cosγ*F and Y velocity = sinγ*F
Now lets say that α=0 and β=-90. It's obvious that both X and Y velocities are equal to 0. But from the equations above I get that X velocity = 0 while Y velocity = F which is wrong.

Vorde
No they wouldn't both be zero. If F is only in one direction, one vector will have all of the force and the other will have none.

kustrle
Yes all the force would be in Y direction, but it just couldn't be applied so Y velocity would still be 0.

Vorde
I don't understand what's wrong, if you just use right angle trig I know it will work out, it's basic vectors.