News Forums RAIN General Discussion and Troubleshooting Enemy Nav to player can NOT avoid each other

This topic contains 1 reply, has 2 voices, and was last updated by  Sigil 1 year, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #38670


    So I am using RAIN AI to set up my enemy AI behaviour:
    Enemies will patrol in a specific route, and keep detect player, once the player is found,
    they will start to follow player and try to attack when get close enough.

    And here is my problem when I test it:
    Each enemy will start to follow player which is ok but, instead of avoid each other’s path
    and pathfinding a new way to get to the player, they just block each other, and the blocked
    enemies just keep going in the wrong direction and could not find a new way…

    Here are what I did so far:
    1 Navgation Mesh added.
    2 Enemy using CapsuleCollider and Rigidbody with rotation freezed, and using BasicMotor.
    3 Using “Move” Node in the BehaviourTree to move to the player when detect.
    4 Using EntityRig to set up the player to make it detectable.



    So we don’t have built in support for agent avoidance (yet, but that doesn’t help you). Normally we suggest something along the lines of sensing any AI that are close and attempting to modify their movement. In addition to that you can also use an attack harness so that all the AI don’t head to the same point at their target.

    Before going that route though, I was going to bring your attention to another thread where we are working with Unity’s NavMesh. It has avoidance as well as some other things so you may want to try that real quick.

    I can’t post it right now but I will come back and throw up some simple avoidance, and find our attack harness and post it as well.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.