Overlap events gets fired/reset if the object triggering them is moved (Fixed)

So I have a blueprint that moves a static mesh if the player begins overlapping a box and stops moving the static mesh when the player ends overlapping the box. The issue is that when the static mesh gets moved by the begin overlap event the end overlap event is shortly fired. This seems to be because the static mesh is moved with the Move Component To node and the thing that fires the event is the player which stands on the static mesh and gets moved with it.

Howdy!

If you wouldn’t mind, could you post an image of your Blueprint so I’m clear on what is occurring and can reproduce it on my end.

Thanks!

This is how it looks at the moment; https://dl.dropboxusercontent.com/u/9876544/blueprint.png and heres a more cleaner version

https://dl.dropboxusercontent.com/u/9876544/blueprintcleaner.png

As long as I move around inside the Box02 in the clean version it will keep on firing the Begin Overlap and once I stop, still inside the Box02 the End Overlap event will fire. As long as I jump to trigger the events they work as they should, it’s when I let the StaticMesh2 move the player it happens.

Thanks for posting this. I attempted both your clean and posted version of your Blueprints and didn’t see the issue you were referring to.

Moving inside the trigger box didn’t affect the movement of the Static Mesh at all, it moved to it’s specified location when trigger the Begin Overlap.

The only time the End Overlap event fired for me was when I left the box. The only time the Static Mesh moved in the opposite direction was when I exited the trigger box before the mesh reached its final position from the Begin Overlap trigger.

Another thing I can try is if you upload your Blueprint .uasset, I can plug that in directly in case I missed something. Alternatively, you can describe what it is you are after and I can set up a sample scenario as well.

-W

I couldn’t attach any files because it kept complaining about invalid file format; https://dl.dropboxusercontent.com/u/9876544/Blueprints.rar the file named NewBlueprintSinkingPlatform is the original version and the one named fef is the clean one. I tried recreating the blueprint in the 2D platform template and the same thing happens there.

What I want to create is a platform that sinks whenever something stands on it and raises back up when nothing is.

Just a small thing, but the preview when writing a post should also work for comments and not just answers.

Hi ,

I was looking over your blueprint in the image and noticed that you have it set up to just register overlaps. Are you spawning the static mesh within the area of your trigger box? If this is the case the static mesh you are spawning may be re-triggering the end overlap. After playing with your blueprint it looks like you need to set the other actor to the player component. Right now it is registering static meshes as overlapping, causing it to see the static mesh you want to move as another actor which is messing up your results. If you are trying to make a lift, I would recommend having a look at this one here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

The fef is starting on the right track, however like I said, it is registering any other object other than the trigger box itself as “other object”, set this to only register the player and it will put you one step closer to what you are looking for. Have a great day!

It doesn’t matter if I make it so only the player can trigger it or not, I still get the same result. If the player is standing on the moving platform both the events will be triggered.

Heres a video showing how it should work and how it works; videoshowingerror - YouTube

0.00-0.12 - How one would expect it to work if the box were attached to the platform.
0.13-0.28 - How it behaves when it is attached to the platform.

Now only the player can trigger the events in the blueprint in the video. It does not matter how big the trigger box is. The moment the player touches that platform both events are fired.

Try pulling the box up just outside of the platform, if you look the platform is cutting into the triggerbox, which could be causing part of the issue. Have it sit just enough above the platform so that the only thing that will trigger the event is the player and see if that helps. Thank you!

Sadly enough it makes no difference and I get the same result as always. I did however place another Character Blueprint while the player stood on the static mesh that activated the events and it worked as it should have done. I also tried setting the Target Relative Location in the Move Component To node to 0,0,0 which caused it to working like it should. But the moment I set that to a value, the moment the character hits the static mesh. It triggers the OnComponentEndOverlap event like it was a OnHit event.

I just want to add that I can however add a second box and use the OnComponentBeginOverlap event for that to move the platform back. But that means that I have to surround the platform with those boxes to make sure the player triggers the event if he does jump off it. However every time I jump on the moving platform it fires the OnComponentBeginOverlap event for the first trigger box.

So it seems like the Move Component To node coupled with those events and if the thing that acts as trigger collision for those events overlaps with the component that moves, this bug happens.

Sorry to bug you about it, but have you gotten any news about this issue? From the tests I’ve done it seems like if the triggering object (In this case my player character) is moved by something (In this case the platform) it does not trigger any of the events. But the moment I move the triggering object (In this case my player character) every event it should have fired gets fired. It seems like when the platform gets moved by the Move Component To node it resets whether or not an event has been fired by any object on it. Like the engine does not check collision/hit checks during the movement of the platform for any objects that gets moved by it.

I tested it by creating a blueprint character and setting that to flying movement instead of falling and moving it using the Add Movement Input node which worked like it should and didn’t cause the events to fire like crazy or be ignored.

Somehow the 4.1 update fixed this bug, and judging by everyones answer it was only a bug for me. So I guess somehow some file/s got corrupted and the patch fixed it. Just wanted to let you know that it’s fixed so no one is having sleepless nights because of it. :slight_smile:

Yo everyone, if you still suffer from this problem like I did, try this.

  1. Go into Mesh

  2. search for Mesh Component Update Flag

  3. change it to Always Tick Pose and Refresh Bones.

Changing this allow to On Begin/End Overlap events to fire even if the Character is not moving.
Good luck <3