I'm writing a simple parkour game based on Bloody Massacre and want to add some simple actions.
Pretty much the idea is this:
Their are three (possibly four) raycasts that are from the waist, neck and top of the head. If their is a collision with the waist point but not with the neck point then the player will vault onto the object. If their is also a collision with the neck point as well as the waist point then the player will climb over the object. If the object is higher then the players head they will run up to the wall and stop or continue normally. Finally if their is a cliff the player will jump off of it (no check for a landing place is necassary).
I plan on doing this by having, as stated, three raycasts that test about 1 meter in front of the player. Then setting some variables (can_vault, can_climb, can_jump). If any of these variables are true then the game will perform the action and animation.
Here is a quick picture I drew to show you what I mean:
My question is how do I do the raycasts? I have not done much with Esenthel and have done nothing with Raycasts. How do I create the three/four raycasts I would need, all aligned facing the y direction of the player and 3 of the four facing flat along the XZ plane? Then the forth cast would have to test if their was any floor beneath the object. I havn't decided if a diagonal or vertical cast infront of the player would be.
If you know of a better way to do this then please let me know.