Let’s say we have an enemy on a high place surrounded by rails. It sees the player at a lower place but, it would be safe for the enemy to jump down to reach the player. How would I go about making the enemy know that they can vault over the rail and fall to where the player is safely? Would their be a way to get the animations right without doing anything too complex? I’ve seen it done in games like F.E.A.R but, I know that game is quite complex; even for it’s time.

  • Believe it or not, it's not as complex as you'd think and actually quite scripted, you would simply have an area on the obstacles you want and a raycast to check how far you are away from the obstacle in question. After that, it's all about timing and Godot has code like other engines that allows you to check what frame an animation is on so you know exactly when you need to let the character move normally again. How do I know this? This is what happens when you poke around games for a long time, there are moments where I've caught the big studios messing up their level design and you can sometimes find obstacles that can't be vaulted over when you should be able to.

    Think of vaulting in the same vein as wall jumping, it's all just about the timing, you're just doing everything forward and vertical.

Believe it or not, it's not as complex as you'd think and actually quite scripted, you would simply have an area on the obstacles you want and a raycast to check how far you are away from the obstacle in question. After that, it's all about timing and Godot has code like other engines that allows you to check what frame an animation is on so you know exactly when you need to let the character move normally again. How do I know this? This is what happens when you poke around games for a long time, there are moments where I've caught the big studios messing up their level design and you can sometimes find obstacles that can't be vaulted over when you should be able to.

Think of vaulting in the same vein as wall jumping, it's all just about the timing, you're just doing everything forward and vertical.

    Audiobellum Well there are other ways of doing it depending on what interaction you're going for, you could just have a raycast fire off and do some checks, it's entirely doable, just don't be fooled by the bells and whistles of AAA games, they use a lot of trickery to make their games seem more advanced than they really are. Sometimes I like to have fun with their garbage AI as do others and you find out for instance their pathfinding is pretty primitive and easy to break lol. It's a good thing to get into with game dev to study this stuff, there are also videos people do where they go out of their way to break games and go into areas they're not supposed to be allowed in.