Jump to content
  • Advertisement
Sign in to follow this  
OneEyed

EPIC with Curve Extrapolation

This topic is 3681 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

Hey guys, I've been modifying hplus's EPIC template to detect curves and rotate along the curve rather than linearly across positions. The basic idea is to keep a history of the latest 3 positions. Then use the 2 directions between the 3 positions to calculate the curve of a circle and move the length of our velocity along the arc starting from the 2nd position in our history. I've created a small test and it seems to work, but I can't tell if it is in sync due to the red line overlapping the blue and being extremely small. It is not perfect that's why I need your help on fine tuning it some more. Once we get it fairly accurate I'll be implementing a 3D version which requires a different method of getting direction to and from the "center of circle". You may download the files (Extrapolator.h and Extrapolator.cpp) here. http://www.mariokartsource.com/dev/One/Extrapolator.rar I save the histories in AddSample, and I determine the curve in ReadPosition. My method uses 2D, so you'll have to disable the debug test "ExtrapolatorTest" in EPIC.cpp since it uses 1 dimension. Let me know what you think!

Share this post


Link to post
Share on other sites
Advertisement
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!