Announcement

Collapse
No announcement yet.

overlap problem

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

    overlap problem

    Hi!

    I have a turret and an ai pawn that moves to attack it.

    Booth of them have a big radius around them( about 1000uu) (in form of a mesh thats set to invisible) that looks for enemys (per get overlapping actors of class)

    Now I have the problem that the turret attacks when the RANGEMESH of the AI pawn is overlapping the turrets range - so it starts shooting before the pawns mesh is actually inside the turret range.

    Booth of them use "get overlapping actors of class" to get their enemies. now i know i could actually check later if the root component is really in distance but that overcomplicates it really hard (and prbably will eat lots of performance)

    Is there any way to let the 2 "aggro range meshes" ignore eachother?

    Click image for larger version

Name:	overlap.png
Views:	1
Size:	14.0 KB
ID:	1154449

    #2
    Here is a solution , with this it will detect when your character capsule is inside your trigger
    Click image for larger version

Name:	test2.PNG
Views:	1
Size:	644.2 KB
ID:	1080716
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

    Comment


      #3
      hello!

      first off, thanks for helping!

      your first approach i allready thought about. but i was worried that it would be a really big hit on the performance with this approach (since the array will be 100 times bigger because theres everything in it, projectiles that are made of 5 components suddenly make the array bigger by 5 entries where as they didnt even show up before (with the get overlapping actors filtered by class)

      there could easily be a few ai characters and a few players around that turret at any given time, so the "overlapping components approach" is quite hefty. in the beginning i also used begin overlap, but i had a few issues with that, and its not exactly how my turret works anyways. but i could re-do the whole turret ai with begin overlap only taking capsules of characters.

      on the otherhand i hoped i could just modify the overlap behavior in some way.

      another way came up when i discussed the issue with someone else who talked about how u can filter for subclasses. idk anyhting about those but i could also go for "get overlapping actors" and filter for capsules, wich again would drop my perfomance quite some. now i wonder if theres a way to set up subclasses for parts of actors (so i could possibly just filter for the mesh of the pawn or just the pawns capsule (and not the ones of projectiles))

      anyways, to follow up with a bit more info i made screenshots of my bp

      http://i.imgur.com/vYUwZDq.png

      thanks so far

      Comment


        #4
        you can make your detection Triggers (ai and turret ) overlap only pawns
        Click image for larger version

Name:	test3.PNG
Views:	1
Size:	20.9 KB
ID:	1080723
        Website [ LINK ]
        Twitter [ LINK ]
        Support ! [ LINK ]

        Comment


          #5
          oh my god that worked. simply perfect.
          I already thought about making subclasses in cpp.

          allthough its not very logical for me since the aggroradius is part of the pawn, but **** im happy it worked.

          thanks very much!

          allright now theres been a few odd things here and there with other collision things (it didnt attack the character, and the melee AI didnt walk up to the turret iself anymore to attack it) but i just go over them all and hopefully get it right.
          Last edited by t0b4cc0; 06-26-2015, 07:41 PM.

          Comment


            #6
            make sure you character capsule generates overlap events
            Website [ LINK ]
            Twitter [ LINK ]
            Support ! [ LINK ]

            Comment

            Working...
            X