And if it is in place it seems too short, it can't remember if it was 30 or 32 frames.
First of all thanks for recording the bugs. You too Lange, it's really helpful.
I erroneously made the horizontal control lock apply at 50 degrees and up, and for only 16 frames.
The pixels aren't perfect at all, they also have strange oddities.
Pixels are always warping while moving, and when moving slowly objects will appear 1 pixel away from each other for a frame or two.
That does come naturally with Unity 2D, but it's also possible to work around. I'll see what I can do about that.
Oh I forgot to ask, are you reading the Physics Guide?
That would definitely help a lot with accuracy.
I am indeed using the Sonic Physics Guide as a reference but also took a lot of liberties with the engine.
- Physics units are converted: pixels to units (100 px/unit), and frames to seconds (60 fps).
- The "four modes of movement" are gone - instead the sensors are just always oriented down perpendicular to the current surface.
- All angles are relative to the current direction of gravity, in all parts of the algorithm.
- The current surface angle is based on both ground sensors, but also knows when to ignore one of the sensors' surfaces if it's too steep, etc.
I wanted to generalize the formula and make it more open-ended, but it seems something got lost in translation.
I am somewhat aware of what's causing the slope skipping, thinking this bit might be the culprit:
So there's a sudden increase in speed when trying to accelerate from a standstill against slopes that cause you to decelerate. But it doesn't happen in the originals, so there's something I'm doing wrong.
Linecasts, which are pretty much the same thing. I get a list of all platforms hit by the linecasts and filter them using triggers, which can decide whether or not they want to be solid to the given collision.
That's exactly what happened. I knew I had big shoes to fill, and in my echo chamber I convinced myself that I could fill them right then and there. Sour mistake that I definitely don't want to repeat.
As for the input problems, that's something I'll have to test on other machines. Thanks for the kind words!