Overlapping not triggering on dynamic toggled collision

I have a simple test set up here. Upon overlapping with a player, the trigger on the right toggles the collision of the plane, which is a staticmesh component of a blueprint actor. The trigger on the left overlaps all and is set up to a print string upon overlapping with any collision. This trigger responds properly when it detects a player, however, toggling the collision of the mesh during gameplay doesn’t seem to generate overlap events. All the flags seem to be set right on both of these. Why doesn’t toggling the meshes collision generate overlap events?

Hello Breakobs,

I believe the issue that you are experiencing is due to the fact that the object is already inside the volume and so no overlap is “beginning” the volume is looking for something that is not in it to enter it (the overlap never began, it just always was). This is why the player works but the object does not (because the pawn enters later).

If you could explain to me exactly what you are trying to do, I may be able to provide an alternate method. I hope this answers your question.

Cheers

Actually, I was able to find a work around for this. If I turn off the overlap events and turn them back on, it updates them, and begin overlap is called.

It looks like there is a bug with toggling collision. It doesn’t seem to update overlap events when collision is changed.

I can confirm the problem. When there is a collision volume in a blueprint and it it set for instance to collide with a static mesh also in the blueprint and you call GetOverlappingActors then only the actor itself, of which the collision box is a part, is returned. Never another actor, that may be of the same BP type and definitely DOES overlap.

However if you add a sequence of SetCollisionEnabled with No/Query only on the collision vlume before checking for collision, then other actors are also returned.

This is unexpected. Should this be reported as a bug? At the very least there should be an option to either report such collisions or not, if the present behavior of the collision query should not be changed.

Hello ,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints that may be involved with this issue?

Having this bug as well. Essentially, I have an enemy and the player within close proximity to each other. The “overlap event” should begin at BeginPlay. However, since its not entering the the volume but spawning in it, the enemy can’t see the player is in range. Trying to figure out a workaround.

4.14.

I had a similar issue when spawning an item inside of the players capsule when he dropped it below his feet. The overlap event fired at spawn but it was too fast for the client to make use of it (as the mesh was not set yet so the outline was not painted on the client). I deactivated the overlap events at construction script activated it back in the begin play after a short delay (to give the mesh update a chance) and moved the actor 0.1 up and 0.1 down. Bit hackish but the events fired.

Thanks for the reply man! I figured out a similar solution myself. I’m using a collision sphere for my overlap, so what I did was I just gave it a very small radius by default. Then on begin play, I set a new size for it that allows for updating of the overlap as it does so. Seems like great minds think alike. Cheers.