+ 6
Tile Based Constrain Collision [SOLVED]
I am working up to making a platformer game, although a problem I have is collision (again) but this time a different type. How could I implement tile based constrain collision? By that I mean, when the player lands on a ground tile, it stays there instead of bouncing off. I tried setting the y-velocity (speed it falls) to 0. But If I'm too high, it gets pushed in the ground. How can I make an object 100% solid. Example (jump multiple times to see what I mean) https://code.sololearn.com/WSC3JL587LQ2/?ref=app
4 ответов
+ 5
Coder Sorry
+ 5
Coder I am starting a fresh now. I am making a clone of my platformer code but this it has a built in collide function and tiles instead of long platforms. It shoupd be more readable. I'll keep you updated if anything happens.
+ 5
Coder Sadly, even using your example it won't work properly. It has results, although the lowest platform is very off center, top and bottom are reversed (weirdly) and gravity stops working once you are off the platform.
https://code.sololearn.com/WSC3JL587LQ2/?ref=app
+ 5
Coder 🤦I feel so stupid 😂. Thanks for your patience.