Projectile issue

Hello

I am new to Box2d.

I am developing a game where the character fires the missile as per the angle set by the player.
Im stuck here!
I dont know how I can set the projectile with respect to the angle , direction and velocity.

Something similar to "Raft Wars : http://www.miniclip.com/games/raft-wars/en/".

I assume that i need to apply force. How do i achieve this.

Any kind of help is appreciated.
Thanx in advance. 🙂
Hello Everyone,

I have solved the projectile issue by
1)Calculating the "angle" based on touch point
2)Calculating the distance b/w touch point and player position and then calculating "vel" based on distance.
3)Then i calculate force = (vel*cos(angle),vel *sin(angle))
4)Then ApplyImpulse(vel,body->GetPosition())

But now i am facing new issue of how to calculate same for AI as there wont be any touch point.

I have gone through link:"http://en.wikipedia.org/wiki/Trajectory".

But the formula in the link doesn't consider the mass. And i also don't have any idea of how would i calculate angle and required velocity to hit the target.

Currently i know the distance b/w AI and target , gravity and mass of ammo body.

Any kind of help is appreciated.
Thanx in advance. 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=6498