I'm trying to implement a wall jump but I don't know what the best way to go about doing it is. Specifically, I don't know how to deal with the collision between the player and wall.
Obviously I want the game to know that what the player just collided with was a wall which is at the correct angle to allow a wall jump; A wall angled at a 75 degree angle naturally wouldn't be acceptable for wall jumping. So my question is, what would be the best way to calculate this collision (in Unity)? Would I get the normal vector of the wall to use for a specific range, and if so, how? Or is there another, better way to do it?
Thanks, all help appreciated!
↧