Announcement

Collapse
No announcement yet.

[Get Overlapping Components] - not returning array of components?

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

    [Get Overlapping Components] - not returning array of components?

    There are two BP functions that makes me wonder a bit
    Code:
    Get Overlapping Actors
    Get Overlapping Components
    The "Get Overlapping Actors" works as I understand and expect it should, it returns an array of items, and the items in that array are Actors. So you basically get a list of Actors.

    So far so good.

    The problem I'm having is with the "Get Overlapping Components" function, it does something different from what I expect it to do.
    The "Get Overlapping Components" returns a list of a single Component per found Actors, not every Components per found Actors.

    So what I unexpectedly get is that the "Get Overlapping Components" returns an Array of Items where I expect it return an Array of Arrays.
    To be more technical I expect a return of an Array of Actors each containing an Array of Components

    In other simpler words I expect "Get Overlapping Components" return EVERY components that it finds on each found Actors.
    Currently "Get Overlapping Components" returns for each found Actor only the first component which is usually the RenderComponent for me.

    Is this a bug or have I misunderstood the whole thing about "Get Overlapping Components"?


    The "workaround" for me is to use the Get Overlapping Actors instead and then from there iterate each Actor to get each respective components (2 nested for each loops)


    The bottom line of what I am actually trying to do, I'm trying to find each overlapping sprites that my character overlaps when pressing E, that contains a special ActorComponent, which I have named PickupComponent. So that when pressing E next to that sprite it should pickup these pickup-able sprites and their behaviors.
    Last edited by HappyPie_PewPew; 07-20-2019, 10:59 AM.

    #2
    In my case Get Overlapping Actors won't even work, my OverlappedActors TArray remains empty after each tick! I'm using C++ source code, not the editor. Is there a way to fix this?

    Comment


      #3
      Originally posted by The_Equalizer7 View Post
      In my case Get Overlapping Actors won't even work, my OverlappedActors TArray remains empty after each tick! I'm using C++ source code, not the editor. Is there a way to fix this?
      If you care to show your the part of the code you are having trouble with, we might be able to help you out.

      Comment

      Working...
      X