View Single Post
SonyAD is offline
Jul3-10, 11:54 AM
P: 75
Hi. Is it a problem of faking ballistic trajectories?

[tex]\frac{x}{e}-d^x + 1[/tex]

e is the ratio:

[tex]e = \frac{\sin(\alpha)}{\sin(45^{\circ})}[/tex]

where α is the launch angle.

d scales the trajectory.

If you want the trajectory to be less sensitive to the value of d then use this:

[tex]\frac{x}{e}-d^{\frac{x}{10}} + 1[/tex]

The other function is more complex but I think it looks better for it:

[tex]\frac{x}{e}-\sqrt{\frac{x}{2}^x}+ 1[/tex]

I think it looks like a missile trajectory, no?

You need to solve

[tex]\frac{x}{e}-d^{\frac{x}{10}} + 1 = 0[/tex]


[tex]\frac{x}{e}-\sqrt{\frac{x}{2}^x} + 1 = 0[/tex]

to find out where the projectile lands in either ballistic graph. Then you simply interpolate in the graph between 0 and where the projectile lands according to the distance to target you've have elapsed so far between the player and target positions.

However, there still remains the problem of varying the projectile's velocity.

Maybe a calculus guru can pitch in.