Advertisement Jump to content
Sign in to follow this  

EPIC with Curve Extrapolation

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!