Best way to jump backwards??

i’m implementing a feature in my enemy AI, that is similar to the Margit’s Jump backwards in elden ring.

what the best way to do this? specifically in the jump part, using Launch Character? using Set Actor Location? I need a jump back with a fixed distance, which is interrupted (does not allow the character to cross the wall) if needed.

The whole behavior boils down to checking if the player is close to the enemy (which is a ranged enemy), if this is the case, he will jump back to get away from the player, I tried to do it with Launch Character but the faster I get closer to the enemy, the greater the jump he makes (I believe it has to do with vector multiplication).

Hey @kuekua!

Launch character actually is what you need here- it sounds like we need to take a look at your code! If you were basing the launch ON the distance to the character then yes you’d have an issue, that needs to be a fixed number. You could even have a scene node placed far behind your character for the goal, suggest launch arc between the archer and the scene node, and use that! That way it would accommodate for land height as well.

Show us what you’re working with! :slight_smile:

Interesting, my code is getting the forward vector to calculate the velocity

This way it worked really well!! Thank you ^^

1 Like