Jump to content
  • Advertisement
Sign in to follow this  
THACO

Need Equiation for curves

This topic is 4595 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!