Hi, I'm trying to make wall climbing similar to the original Prince of Persia. I don't know if this is the best way to go about it, but I have it set so that if the player hitbox is overlapping a wall by an x offset and presses the z key a climb animation will play. When the climb animation finishes it then teleports the player hitbox to an image point on top of the wall so that it is in the correct position to continue play.
My player hitbox is 16x32 and the pivot point is in the middle of this. So to get the player flush against the top of the wall after they've climbed it I have my wall's image point set to y -16. What happens though is weird - when the hitbox teleports to the wall's image point, instead of being on the ground flush as you would expect it to, it instead triggers the fall animation - and messes everything up.
What is interesting, is if I compensate by one extra pixel and set the wall's image point to -17 it works almost perfectly, however there is then a weird 1 pixel gap between the player hitbox and the top of the wall - it just kind of hovers there as if the platform behaviour has forgotten about gravity. If you jump or walk, it will then return to the ground correctly. Is this some kind of bug in the platform behaviour?
I have pixel rounding on, for the record.
Is there a better way I could achieve this sort of Prince of Persia style climbing?
CAPX attached for anyone who can take a look
Thanks for any insight!
Link to CAPX