How can you tell the engine which sprite collision shape to use when performing overlap checks?
I have a 2D sprite that has two collision shapes defined. In my code I am referencing the
This is working fine as long as I have just one collision shape. The moment I have two shapes (i.e. one for world collision and one as enemy hitbox) it looks like
I'd rather have it perform overlap checks using the collision shape I tell it to. Is there any way to accomplish this?
Another way could be to enumerate the collision shapes and be able to enable/disable them before performing the overlap check, but I couldn't find a method to get the list of the collision shapes.
Thanks in advance for any help!
asked Jan 28 '17 at 11:26 AM in Using UE4
I'm answering my own question. The easiest way is to avoid using the sprite collision shapes at all and attach as many UBoxComponent to the Actor as needed. In my case I created two UBoxComponent, one for world collisions and one for bullets collisions. That way I can just call GetOverlappingActors() on the component I want to check with.
answered Jan 30 '17 at 06:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here