r/howdidtheycodeit • • Sep 02 '22

Third person ledge detection

You know when the character jumps and then hangs from an edge of a platform or ledge and then climbs it? Is that mechanic collision based? Does it depend on the geometry of the level?

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

2

u/oddbawlstudios Sep 02 '22

Yeah you can absolutely do that. You choose which to do though. Tagging is a lot of manual work and it means the ledge is 100% grabbable or not, you also have a chance of missing some ledges if you forget to tag them. However, the easier option is to base it off of angles and detect if its too sloped to be grabbed, which is easier, but its not a 100% guarantee.