Methods on climbing objects.

Hi everyone this is my first post on these forums and am looking forword to being an active member.

I’m currently working on a small RPG game with some platforming involved. I already have a pretty good start with my scene set up with textures and the main character modelled/textured and animated but I’m curious on one subject and how exactly to go about approaching it.

How would I make a character climb objects. I know I would use collides or ray casting but do I have my animated character climb up in one spot and animate the y axis in script? Or do I animate the character climbing in the y axis and then snap the character to the new position one the animation is complete? I’m very confused on how to set this up and any help would be appreciated.


There are two different ways that I could think of doing this:

  1. The slightly easier method would be to have a climbing animation that plays in place (doesn’t actually move the model, just “treadmills” them) and then move the model manually using code at a speed that makes the climb look realistic. I like this method a bit better because once they finish climbing they’re already in place and you can just loop the climbing animation for as long as you need for whatever is currently being climbed.

  2. The other method that I’ve used that I don’t like quite as much is to have the climbing animation play fully and then teleport the character to their new position like you described. This method is a bit of a pain in my opinion because your animation has to match exactly what you’re climbing and you have to time the teleport at the end perfectly to avoid any odd visual results.