Announcement

Collapse
No announcement yet.

How do I make AI circle strafe the player using Environment Query System?

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

    How do I make AI circle strafe the player using Environment Query System?

    Hi all,

    I'm using the Environment Query system. In the enclosed picture, I have donut points with trace and dot tests.
    The guard AI runs to the point to basically run from the player, when he's armed.
    Click image for larger version

Name:	asdfas.JPG
Views:	1
Size:	62.6 KB
ID:	1154781

    I want the guard to strafe the player and maybe look for cover but still keep the player in sight.

    Do anyone have any idea on how to do that?
    Any help would be greatly appreciated.

    Thank you
    Check out my itch.io page, I'm really excited about it.
    https://kinos141.itch.io/

    Please check out my AI package: Action AI System Feat. Stealth
    https://www.unrealengine.com/marketp...m-feat-stealth
    or get it from itch
    https://kinos141.itch.io/action-ai-system-feat-stealth

    #2
    PERSONALLY, I wouldn't use EQS for this.

    I would create a custom Task node called "circle strafe" and I would just have it call blueprint logic which, every tick, updates the AI's control rotation to face the player and then applies a movement input to the left of his current control rotation. This is how players circle-strafe (move left while rotating the aim).

    If you set this up as a task you can use the EQS donut trace for things like determining if there's sufficient space around the player to execute the maneuver without getting stuck on a wall or falling into a pit, and use a blackboard key that queries distance to player to halt the execution of the action if the player moves too far away from the enemy, but I wouldn't try to use move targets for this. If nothing else, even if you could get the logic in place using the EQS Queries, the AI's motion would be fairly lurchy as he moved from one spot to the next, rather than a smooth circle strafe motion.

    My $0.02

    Comment


      #3
      Thanks for the tip. I've been trying to understand AI strafing for years, but never got it.
      I will do that for strafing, but I also wanted the AI to pick some cover if under fire.
      Check out my itch.io page, I'm really excited about it.
      https://kinos141.itch.io/

      Please check out my AI package: Action AI System Feat. Stealth
      https://www.unrealengine.com/marketp...m-feat-stealth
      or get it from itch
      https://kinos141.itch.io/action-ai-system-feat-stealth

      Comment


        #4
        Hi RhythmScript,

        I've been trying to use the method you mentioned, but the built in move to functions force the pawn to look it the direction, even with strafing checked.
        Will look into other solutions.
        Check out my itch.io page, I'm really excited about it.
        https://kinos141.itch.io/

        Please check out my AI package: Action AI System Feat. Stealth
        https://www.unrealengine.com/marketp...m-feat-stealth
        or get it from itch
        https://kinos141.itch.io/action-ai-system-feat-stealth

        Comment


          #5
          Originally posted by KinDaKreator View Post
          Hi RhythmScript,

          I've been trying to use the method you mentioned, but the built in move to functions force the pawn to look it the direction, even with strafing checked.
          Will look into other solutions.
          don't use MoveTo, use an action which literally just applies leftward movement on the pawn. MoveTo is a navigation command which does more than just move (it moves using navmesh paths, rotates the pawn to face the move target, etc).

          Comment

          Working...
          X