I’ve made a lot of progress in my game Superstick, I will probably be posting some videos pretty soon. Right now I’m trying to get my player to jump onto a platform and if his head collider touches the edge of a platform then allow him to grab onto the platform and allow him to climb up. Is this something anyone has done before? I don’t need code but theory to know what the best way is to do it?
It depends on how you want the “climb up” to occur. One way to do it would be once the collision occurs, immediately set the player rigidbody to kinematic… or immediately set the gravity on the player to zero. Either way, this serves to temporarily freeze the player. Now if you want, you can override what your onscreen controls do, and have it so that if the user taps the onscreen control up, it will call a custom method which automatically moves the player on top of the platform, then later restores the rigidbody back to dynamic, or restores the gravity back to normal, and restores the onscreen control back to normal functionality. Alternatively if the user taps the onscreen control downwards, then it effectively cancels the “climb up” method, and restores the rigidbody back to dynamic, or restores the gravity back to normal, thus having the player fall back down to the ground.
There are other ways to do all of this, I’ve just shared one way.