   how is collisions calculated to climb ladders
  i am trying to think how the collision is done when the player is next to the ladders then press's up to change animation to climbing as well as changing translation on y axis so he moves up etc,what is the way to calculate when the player is stood near or next to the ladders for the action allow to climb up and even then there is a need to detect when he is at the top , so it switchs back to standing animation..directx btw and third person mesh , not camera look it   
Quote:Original post by Anddosi am trying to think how the collision is done when the player is next to the ladders then press's up to change animation to climbing as well as changing translation on y axis so he moves up etc,what is the way to calculate when the player is stood near or next to the ladders for the action allow to climb up and even then there is a need to detect when he is at the top , so it switchs back to standing animation..directx btw and third person mesh , not camera look itI haven't actually done this myself (nor do I know for sure how it's typically done in games that offer this feature).If I were tasked with implementing this though, the first thing I'd probably try would be to define a cylinder or oriented box representing a 'ladder mode volume'. This volume would be positioned in front of the ladder, running roughly from the bottom to the top. If a character's bounding volume were touching this volume (or perhaps if some reference point associated with the character - such as between the character's feet - were inside the volume), and if the character were facing more or less towards the ladder, the character would be in 'ladder move' mode. In this mode, the controls would behave differently: in particular, forward and backward motion would translate to vertical motion, with the speed determined by the pitch of the character's view (that is, the more the character was 'looking up' or 'looking down', the faster the vertical motion would be).Note that I'm thinking of this in first-person terms, more or less; in a third-person game, you might handle things a bit differently.In practice, of course, there would probably be additional details to address, such as making sure getting on and off the ladder works smoothly and correctly, and perhaps allowing the character to 'yaw' freely while on the ladder (e.g. to look or aim away from the ladder while hanging on to it).   ;  I haven't done it either but I'd like to add to jyk's idea.It really depends on how you want it to work, should the player initiate the action?, or should  the action be automatic by having the character run into the ladder? should the player be able to drop from the ladder halfway through it or not?On either case, it becomes a matter of how far the ladder is and the direction the character is facing, the easiest to implement IMO would be to use long boxes marked in some way to represent the ladders, disable gravity when "walking" over them and write some code to deal with the climbing animation.