Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

2D AI Jumping

Hi, I have a problem with 2d AI. I don't know exactly how to make it be able to jump. Can anybody help me, please? Well, I tried to add force whenever player is above a certain height, but it doesn't work really well, because AI just bumps into platforms above him. I would be really glad if somebody would like to answer:)


  • Sl0thSl0th Member

    Hey there, we'll need some more information to help you out.

    Are you having an issue with figuring out when to jump or how to jump? What are you using to control the AI besides jumping? What is it supposed to do instead of jumping into platforms? What is the purpose of the jump?


    Of course, thanks for answer.

    So I have an issue with figuring when to jump, but also how to jump( I'm not sure which option is the best). For AI generally, I use scripts from Brackeys tutorial "AI Pathfinding". There's a script in which you can determine, where the enemy can go. Then you have seeker script, which creates the shortest road to the destination point (player). The last script makes the enemy move. If you want, I can show that script.

    The main problem is that seeker creates the shortest road, but not throughout the platforms, grounds, so when the player is already on one of the highest points, enemy goes there the shortest way (which is impossible, because he's not able to fly).

    The purpose of the jump is to come near the player, so the enemy can attack him.

Sign In or Register to comment.