Search Unity

Ledge grabbing? - Need a better solution to the problem

Discussion in 'Scripting' started by Sam_Pr, Aug 7, 2013.

  1. Sam_Pr

    Sam_Pr

    Joined:
    Aug 23, 2012
    Posts:
    66
    How do you suppose I could go about allow a player to grab any ledge in the game as long as they're close enough to the top of it?

    I was thinking you could do game objects in-front of the players all raycasting and comparing results. Then if the top one had something farther away, and the lower ones were close enough to something then it would allow you to grab onto the ledge. However this doesn't seem like it would be the most practical way of going about it.

    So do you guys have any better ideas that could work for it?

    Thanks for any ideas!
     
    Last edited: Aug 7, 2013
  2. Ceryni

    Ceryni

    Joined:
    Apr 6, 2013
    Posts:
    8
    i think best practice is to put trigers on all edges. to fsten your production proces you can write an editor extension that places them automatically.