Hello guys!

I have some Math stuff here. What I need, is get projectile spawn rotation by some information I do have.

G - Gravity vector

Vh - Hit location coords

S - Initial speed

So… At first I was using next formula to get hit location:

```
Vh = Vi * T + T^2/2 * G
Vi - Initial velocity
T - time from begining
```

Geting initial velocity by end hit location was pretty easy here:

```
Vi = (Vh - T^2/2 * G)/T
```

It works, but here I have dynamic velocity and I must know existing time of a projectile before hit.

But what I need, is static velocity length (speed) and automatic time calculation (or get rid of that).

```
Vh = Vi * S * T + T^2/2 * G
Vi = (Vh - T^2/2 * G)/(T*S)
```

But here I still have to know the time of reaching target.

Can anyone help me finding T here (I’m not sure I’m able to get a formula of T)?

Or giving me another formula or another way to calculate all the stuff from G, S and Vh?

I would be very thankfull…