Announcement

Collapse
No announcement yet.

Modifying AI to float in the air.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Modifying AI to float in the air.

    Hello, to this moment I have created this guy : https://youtu.be/DJTrQ9hwGDo .
    All he does is detecting player, running to him, and charging like a boar or something, and killing me if he runs through me.
    I want to modify him that he could :
    1. Fly to me, not shortest way possible, and kind of floating like a ghost.
    2. While preparing to charge, also continue floating but already focused on me around some radius from character.

    All of that will be really helpful, at least with some ideas and tutorials, if not solutions.
    Thanks.

    #2
    Originally posted by Eamirus View Post
    Hello, to this moment I have created this guy : https://youtu.be/DJTrQ9hwGDo .
    All he does is detecting player, running to him, and charging like a boar or something, and killing me if he runs through me.
    I want to modify him that he could :
    1. Fly to me, not shortest way possible, and kind of floating like a ghost.
    2. While preparing to charge, also continue floating but already focused on me around some radius from character.

    All of that will be really helpful, at least with some ideas and tutorials, if not solutions.
    Thanks.
    Hi Eamirus,

    I am currently working with flying AI and I am doing something similar. In my case Im not using any navmesh at all and simply using the "Add Movement Input" node that comes from the Character class. Using that node you can specify a world direction for your character to move and the speed (among other things).

    So if you want your enemy to fly towards the Player, simply get the Player's location and use that to set the enemy's direction. Ofc, if you want the enemy to "charge" and look for the Player within a radius, you will have to add that behavior separately.

    I would recommend to start simple - make your enemy fly towards the Player first. Then, once thats working, look at adding a delay ("charge period") and go from there.

    Hopefully this puts you on the right track!
    [WIP] Procedural City Generator | RPG AI
    [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
    [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds | Procedural Buildings
    Join our Discord

    Comment

    Working...
    X