Download

Finding the Number of Components in a given area with BoxOverlapComponents (HELP)

Hello. This is my first post and my first time with Unreal Engine so go easy on me.

I’ve been trying to make a blueprint that will scan a certain area for a specific mesh and get the number of meshs in that area, I’ve been using BoxOverlapComponents to do this. I’ve made an actor (just a cube) and I’ve attached a custom Actor Component BP to it (Nothing in the Event Graph), its called BaseScanComp:

image
image

Because my object type is set to Physics Object it also has Physics turned on.

In my BP to scan for the actors (called ActorScan) I’ve got this:

The problem is when I run it it never detects the BaseScanComp actors, it will detect other physics bodies when the Component Class Filter is set to None and it will detect the StaticMeshComponent Component of the cube if set to that:

image


When set to filter for the BaseScanComp /\

image
image
When set to None, also the same for when set to StaticMeshComponent /\

I’ve tried a few things but I’ve got no clue why it isn’t working so any help or advice is welcomed.
Thanks in advanced - RW

Could you clarify one thing:

a blueprint that will scan a certain area for a specific mesh and get the number of meshs in that area

But then you say:

The problem is when I run it it never detects the BaseScanComp actors,

So what are we trying to detect, really?

  • Static Meshes?
  • Scan Components?
  • actors that have Scan Components?

Actor Components have no transform, no type and are not physically present in the world. They can be detected but we’d need to go about it slightly differently.

If I had a bunch of actors hanging around some of which may have Actor Components I’m interested in:

image

And I needed to check how many components there are in total in the area, (perhaps some actors have more than one!), I’d:


Do tell what you think, I might be missing the point or misunderstood something crucial.

OMG you’re amazing thank you so much. The context is im trying to make a pizza game and to rate the pizza it will count the actors on the pizza like cheese and if theres enough you get a point. I was trying to scan for components but ones that I’ve applied to actors (wasn’t scanning for meshs, I ment actors, sorry for confusion).

I made a few changes but it’s basically the same:

I’ve been scraching my head about this for ages and you’ve sorted me thank you!!!

1 Like