okay, anyone know of a function (or combination of funcions) that have an output like:
it doesn''t have to be exactly like that (ph33r 4h3 m5p41n7 5k1llz), but as long as for about the first 1/3 it stays roughly the same then declines dramatically afterwards. also, a way of modifying when it begins the steep decline would be good too.
*sigh* all this to implement view- and aim-independant firing .
thanks in advance
Edit: Well, the only problem is that the function starts to dip at about x = -4.5. But other than that, it should roughly model what you're looking for.
[edited by - Apocalypse_Demon on January 16, 2003 8:53:44 PM]
Depending on how you interpret that curve, it could be anything. For example, you could draw a straight line between (0,1) and (1,0) and have a curve that at least starts and ends at the right place. Also, you could draw a quarter of a circle of radius 1 centered at the origin and get something close.
Another simple approach that approximate the desired curve would be to have two line segments, one from (0,1) to (1/3,1) and another from (1/3,1) to (1,0). You wouldn''t have the nice smooth transition, but evaluation of the curve would be cheaper than the exponential functions.
Graham Rhodes Senior Scientist Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net