EPIC with Curve Extrapolation

Started by
-1 comments, last by JoeOfTexas 15 years, 9 months ago
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!

This topic is closed to new replies.

Advertisement