Ue4 C++ AI Behavior Essentials Part 4 - Strafing and Shooting

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024
  • In this video we create our first combat behavior for our bots which is strafing and shooting.
    Download the UE5.4 Version from:
    www.patreon.co...
    Download The Project From :
    drive.google.c...

ความคิดเห็น • 24

  • @CulbladeStudio
    @CulbladeStudio 2 ปีที่แล้ว

    Really good work here. Hope you continue with the combat roles etc. Thanks. You got my Sub.

  • @sakur7870
    @sakur7870 2 ปีที่แล้ว +1

    nice video i cant wait for next video Gj

  • @pawpotsRS
    @pawpotsRS 2 ปีที่แล้ว

    I don't know C++ but this made me subscribe :)

  • @dominikwerner6608
    @dominikwerner6608 ปีที่แล้ว

    Thank you very much for another great tutorial, very easy to follow as always! There is one thing I found a bit strange: At 11:07 you show the avoidance in case of damage and you use the LastStimulusLocation as the condition for the movement. If I understood the idea correctly it should probably be the MoveToLocation instead of the LastStimulusLocation. Thank you very much in advance for clarification.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  ปีที่แล้ว

      at 11:07 I was talking about strafing.....it usually moves a little bit to the left and right when not damaged but it moves further away while strafing if it is actually damaged.....it's running the same eqs query just the acceptance radius on the move to node is different

    • @dominikwerner6608
      @dominikwerner6608 ปีที่แล้ว

      @@pranjalbhattacharjee5601 Thank you for your reply. I understand the eqs query but if you look at the "Find Strafe Location" task you set the "MoveToLocation" BB Key but then check the "LastStimulusLocation" BB Key on the SimpleParallel sequence next to it.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  ปีที่แล้ว +1

      @@dominikwerner6608 I will get back to you I don't remember why I put that decorator on the simple parallel

  • @ps5games821
    @ps5games821 2 ปีที่แล้ว

    Great videos
    Thank you

  • @anubhavbhattacharya5543
    @anubhavbhattacharya5543 2 ปีที่แล้ว

    Great

  • @vegitoblue2187
    @vegitoblue2187 2 ปีที่แล้ว

    Why not separate each state into trees and control the states from the controller itself? It will make debugging easier, make your AI more modular (Custom trees per state) and less prone to bugs.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  2 ปีที่แล้ว

      That can be done but it is already setup in a way that only a single sub branch runs for any given state and the state is set from the controller or sometimes with leaf nodes if needed.....so doing separate trees per state would only make it look prettier internally it already aborts execution as soon as the state changes

    • @vegitoblue2187
      @vegitoblue2187 2 ปีที่แล้ว

      @@pranjalbhattacharjee5601 But that leaves out the flexibility part. I could have idle and combat behaviors separate with common BBs. So I only would have to swap my combat tree if I am doing a sniper/melee/shotgunner. You could call the state change via bt leaves to the controller in this way too.
      Also, not relying on the bb for states would also make it less likely to break right?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  2 ปีที่แล้ว

      @@vegitoblue2187 Well..... swapping out behaviour trees is done using the set subtree function and using the run behavior dynamic node in the tree itself.....doing that is kind of sort of memory intensive..... it's fine as long as you don't do it often.....I suggest that you implement it and then do some performance testing

    • @vegitoblue2187
      @vegitoblue2187 2 ปีที่แล้ว +1

      @@pranjalbhattacharjee5601 Memory intensive? This I'll have to check. What I do is call all the behavior running calls via the controller.

  • @ivarplays9873
    @ivarplays9873 2 ปีที่แล้ว

    I tried to put the AI characters and used the player character that you provided with the project on a new map. But the AI is not responding to the player. How can I fix that?. I have added the AIManager to the level. Is there anything I can do to test this on a new map?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  2 ปีที่แล้ว

      Does the new map have a nav mesh....??.....Is the player placed too far away from the bots.....??.....I won't be able to do much without taking a look at your project......

    • @ivarplays9873
      @ivarplays9873 2 ปีที่แล้ว

      @@pranjalbhattacharjee5601 I used the same map, but different location. But the AI didnt work. The same AI in defenders map with same AI managers. The nav mesh was proper.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  2 ปีที่แล้ว

      Are these bots from different factions (friendly / enemy).....bots from the same faction won't fight eachother.....the player also belongs to the friendly faction......this is strange.....why would a different location break the ai.....🤔

    • @ivarplays9873
      @ivarplays9873 2 ปีที่แล้ว

      @@pranjalbhattacharjee5601 the player is friendly. All the red ones are enemy factions. Could you please try it if you have the time?. Just import a free map into the same map as add an existing and try relocating anywhere in that landscape. I think landscapes might not be the issue. I will check with non landscape maps

    • @ivarplays9873
      @ivarplays9873 2 ปีที่แล้ว

      @@pranjalbhattacharjee5601 Could you please check inside you project?