Game Development Community

Projectile with defined end point ?

by Eros Carvalho · in Torque Game Engine · 04/26/2005 (2:21 pm) · 6 replies

There is any way that I can simulate a projectile movement, but with pre-defined starting and end positions?
Its some type of parabolic curve...

Anyone have done this?

#1
04/26/2005 (2:54 pm)
Yeah the T2 repair and laser guns used it. There should be enought perxeisting code to replicate it, if I recall you need to make a spline. Talk to Hobbs from the Legends.
#2
04/27/2005 (10:58 am)
I wrote some code for inverse trajectory determination that may help. You give it a destination coordinate, projectile velocity and gravity and it will return how high you need to aim to make the projectile land on the intended target. There are more derivations of this for solving for time or whatever in Game Programming Gems that may help you as well.

-s
#3
04/27/2005 (11:12 am)
Spline patches are what you need from the Math Lib. I don't know of any resources that exploit this feature but I would love to see one.


Hmm or better SplineUtil namespace look at this function

Draws strip of specified width along spline. Polys on strip segments are front-facing (billboarded)
drawSplineBeam()
#4
04/27/2005 (11:17 am)
I'm not sure he's talking about a curvy spline path, so much as figuring out what angle and velocity a projectile would need to be fired at to reach a specific destination.
#5
04/27/2005 (11:19 am)
It is pretty easy to figure out if you know the distance to target and the velocity... or the distance to target and the angle...

I can give you an equation for doing so if you'd like... The equation is quite simple to work out.
#6
09/18/2006 (10:50 pm)
Hello, can this be done by using scripting ?
if so.. can u show me the code / pseudocode for this curve projectile movement ?

thanks alot!!