x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Hard limit on overlapping actors?

Hey,

Is there a limit on the number of actors that can be returned by GetOverlappingActors?

I seem to only ever get 992...

Here's an image, all I'm doing is making all the cubes overlapping the box-collider white: alt text

And here's the relevant code I'm using to get the actors:

 AWhiteBoxVolume* cVolume = *ItActor;
 
         TArray<AActor*> OverlappingActors;
 
         cVolume->CollisionBox->SetCollisionResponseToAllChannels(ECR_Overlap);
         cVolume->CollisionBox->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
 
         cVolume->CollisionBox->GetOverlappingActors(OverlappingActors, AStaticMeshActor::StaticClass());
         WhiteBoxMaterial = cVolume->WhiteBoxMaterial;
         if (cVolume->WhiteBoxOutsideActors)
         {
             ActorsToNotWhiteBox.Append(OverlappingActors);
         }
         else
         {
             ActorsToWhiteBox.Append(OverlappingActors);
         }

Product Version: UE 4.8
Tags:
more ▼

asked Aug 21 '15 at 01:52 AM in C++ Programming

avatar image

Ineni.Realtime
119 28 37 45

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Yep there is hardcoded limit of overlapping actors, if you want to tweak it go to:

 PhysxCollision.h


and tune, then recompile whole engine;) :

 #define OVERLAP_BUFFER_SIZE                        1024
 #define OVERLAP_BUFFER_SIZE_MAX_SYNC_QUERIES    992




There is also limit for tracing/sweeping in the same file:

 #define HIT_BUFFER_SIZE                            512        // Hit buffer size for traces and sweeps. This is the total size allowed for sync + async tests.
 #define HIT_BUFFER_MAX_SYNC_QUERIES                496        // Maximum number of queries to fill in the hit buffer for synchronous traces and sweeps. Async sweeps get the difference (HIT_BUFFER_SIZE - NumberOfHitsInSyncTest).



If you want to know how these limit works take a look at PhysxCollision.cpp -> GeomOverlapMultiImp_PhysX function.

Regards

Pierdek

more ▼

answered Aug 21 '15 at 07:15 AM

avatar image

Pierdek
2.6k 73 47 130

avatar image Ineni.Realtime Sep 07 '15 at 03:56 AM

Alright, I guess that answers it. Makes some sense, but it's quite annoying and a very arbitrary-seeming number. I'll just have to automatically subdivide until I have enough boxes I guess.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question