2DPlatformer-Tutorial
2DPlatformer-Tutorial copied to clipboard
Slope Transition Issue
First off, great tutorials!
Has anyone noticed any issues when transitioning between slopes and the collisions
data? Specifically the status of collisions.below
?
Using my own copy and the source code from the repo produces the same following results (watch the output of the Below box):
Notice the quick switch between true/false? It's made it somewhat unreliable to use any animation states between grounded to falling. Any help is appreciated.
I'm developing this tutorial more, fixing some bugs, can you please check if it still happens @ https://github.com/llafuente/unity-platformer
First off, great tutorials!
Has anyone noticed any issues when transitioning between slopes and the
collisions
data? Specifically the status ofcollisions.below
?Using my own copy and the source code from the repo produces the same following results (watch the output of the Below box):
Notice the quick switch between true/false? It's made it somewhat unreliable to use any animation states between grounded to falling. Any help is appreciated.
did you ever figure out a solution for this? having the same exact issue, i know its been a long time :p
Unfortunately no, I ended up going with a tile based approach like those mentioned in http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/
Just for anyone reading this in the future, i fixed this by adding an extra groundcheck below the players feet.
if (!Physics2D.OverlapArea(leftFoot.position,rightFoot.position,obstaclesLayermask)) playerAnimator.SetBool("inAir", true);
could probably do it better with raycasts,, im just happy my animations dont change for that 1 frame anymore :p