OverlapMulti with FCollisionShape::MakeBox is not working as expected
So I am trying to get some Pawns by overlapping a Box, so I am using OverlapMulti and FCollisionShape::MakeBox, and it is not finding the pawns.
The offending code:
bool bAnyOverlaps = GetWorld()->OverlapMulti(Overlaps, Center, FQuat::Identity, ECollisionChannel::ECC_Pawn, FCollisionShape::MakeBox(BoxExtent), BoxCollisionQuery);
I used DebugDrawTraceTag to check if I was just getting the wrong location / extents for the box, but it looks perfectly correct!
Now the real stickler, is that it works fine if I use FCollisionShape::MakeSphere with whatever radius. It finds all the all the pawns as I would expect. There seems to be something specific to the Box, but I am at a loss for what.
As I said, the location and size are all correct, and the channels are correct as it works with sphere.
Any help would be much appreciated.
asked Jun 01 '15 at 02:42 AM in C++ Programming
I just figured it out: Box extents have to be positive. That makes sense!
answered Jun 01 '15 at 02:59 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here