Platformer

General discussion about Box2D tutorials
Post Reply
kyle.bong2@gmail.com
Posts: 41
Joined: Thu May 29, 2014 5:01 am

Platformer

Post by kyle.bong2@gmail.com »

Hi iforce2d, I wanted to see if any here can give me some guidance. We are making a platform game and getting stuck on a couple of issues.

Hero uses a circle body so when --

1. hero jumps on platform sometime it gets stuck at the corner
2. when hero stand on the corner of block it tends to slide off

Any ideas about how we can fix this using box2d? I attached an illustration below to show the issues.

Thanks in advance for any help!

Untitled - paint.net 4.1.5 2019-03-26 19.35.28.png
Untitled - paint.net 4.1.5 2019-03-26 19.35.28.png (40.06 KiB) Viewed 22164 times
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Platformer

Post by iforce2d »

This is a pretty tricky thing, and not likely to be solved without quite a bit of twiddling with how contacts behave (or at least, whether to even have a contact in some situations). This is probably the best help I can give for starters, unclear if you have seen it yet so I'll just point you here to begin with: http://www.iforce2d.net/b2dtut/one-way-walls
kyle.bong2@gmail.com
Posts: 41
Joined: Thu May 29, 2014 5:01 am

Re: Platformer

Post by kyle.bong2@gmail.com »

Thank you!
Post Reply