@pkowal1982 said:
First you can narrow the ladder area so you'll be able to climb only in the center of ladder.
Second, you can modify your script a little, I've attached modified script for testing and annotated it with # look here comments.
That works. I also solved the problem by adding this line under if climbing:
global_position.x = floor(global_position.x / 16) * 16 + 8
Though, this also requires the ladder's collision box to be narrower; otherwise, she sometimes teleports right off the side of it.
@pkowal1982 said:
For me it still needs some logic to avoid teleporting to the center of the ladder but it's a start.
As for this, I agree, and I solved it by adding this:
global_position.x = lerp(global_position.x, floor(global_position.x / 16) * 16 + 8, 0.5)
But, I think that weight is a little low.
Thanks for taking the time to look through my code! I appreciate it, and I hope it wasn't too messy. :dizzy: