OnEndCursorOver... only works on one specific map?

Hi all,

I am having a very unusual issue with the function OnEndCursorOver. I am using this function on my character’s capsule component to determine whether or not the mouse is within - if it is, I enable SetRenderCustomDepth to draw an outline around the mesh, otherwise it is not visible.

Here is the unusual part: this function is only ever called on one of my maps. If I make a brand new map and drop in a few characters, use the same GameMode and add the required PostProcessingVolume, the function is never called. This is absolutely the case, because the break point is never hit.

Here’s the line of code I’m using:


this->CapsuleComponent->OnEndCursorOver.AddDynamic(this, &ARoguelikeCharacter::MousedOverEnd);

As far as I can tell, nothing sets this map apart from any of the others. Of the 5 maps I have tried, only this single map works. For further clarification - this is using the same controller and character in each level.

Is there some level variable or other setting I must enable to see this event fire?

Is there any UMG Widget blocking the screen maybe? If there are UMG Widgets, set their Visibility to Hit Test Invisible.

I’m afraid not - same UI on each level

Can you duplicate the level where it works and see if it still works in that duplicate? You can ctrl c, ctrlv them.

I had thought of trying that - but copy and pasting levels doesn’t seem to be supported in the editor. Is it possible to do so? I tried it before via windows explorer but it doesn’t update the maps’ metadata, so it doesn’t really work

Just do it inside of the editor / Content-Browser. Select the Map-Assets, CTRL+C and then hit CTRL+V. Should work, I did it yesterday and everything worked :slight_smile:

You’ll have to forgive me - I absolutely feel like I’m missing something here…

Here are my map files. If I try on these, literally nothing happens, and there’s no option in the right-click context menu to copy or duplicate them:

ccd699475d3cc82f17c14a99b5a632e6.png

Am I missing something?

OK - I’ve managed to duplicate the map, apologies about that. I can confirm the event is fired on the duplicate level as well, just not the other 3.

It might also be worth mentioning that mousing over things seems to work fine on all maps. Although I am using a different approach for the mouseover - on a tick function I am using a raycast to see if my mouse if overlapping a character, and if so enabling Setrendercustomdepth. The idea is that the OnEndCursorOver would then do the opposite. The event is registered in the constructor.

Should there be any additional setup for this event to work? The player controller has enabled mouseover events, and everything seems to be in place. Any help would be greatly appreciated

Apologies for bumping - just wondering if anyone else had ever encountered this issue? I’m not even sure what to try next!