Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slope Transition Issue #4

Open
jakeklassen opened this issue Nov 25, 2015 · 4 comments
Open

Slope Transition Issue #4

jakeklassen opened this issue Nov 25, 2015 · 4 comments

Comments

@jakeklassen
Copy link

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):

Scene Gif

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.

@llafuente
Copy link

I'm developing this tutorial more, fixing some bugs, can you please check if it still happens @ https://github.com/llafuente/unity-platformer

@mathijs-dr
Copy link

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):

Scene Gif

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

@jakeklassen
Copy link
Author

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/

@mathijs-dr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants