Sign in to follow this  

Need Equiation for curves

This topic is 4379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, when someone gets damaged in my game, I want to have them move fast at first then slower. I want this as a curve though, so it keeps close to the original speed then takes a sharp curve and stops fast. My math is rusty and my graphing calculator is at school. The scripting language I am using also only supports +,-,*,/ no logs and no sqrts. I would do each component seperate so I would run the function for the power in the X direction, then for the Y direction ( I don't use Z). Any suggestions or places online I could look. I feel I should already know this but I apprently do not. Thanks -THACO P.S. My time value preferably would in second.

Share this post


Link to post
Share on other sites
A nice curve using basic functions could be something along the lines of this:
v + b-bca(t-d)

Where v is the initial velocity before being hit
b is the maximum boost after being hit
a is a tuning constant.
c is another tuning constant.
d is the duration in seconds of the boost.

I got a nice curve using a=0.1, b=1, c=2, d=20.

Share this post


Link to post
Share on other sites
This should work nicely, still lots of configuring to do but the curve should work well, now its more of me figuring out how to calculate the overall time and power of attacks. Thanks a lot

-THACO

Share this post


Link to post
Share on other sites

This topic is 4379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this