Bizzare MouseOver behaviour

Greetings everyone,

I use a procedural generator to spawn actors (square map pieces with landscape) in my level. Each one has a mouseOver event that triggers a yellow highlight, like so:

73837-cursor1.jpg

However, some of the actors are really hard to mouseOver, i.e. the mouseIOver region seems very small or non-existent. In the previous example, this tile (see cursor) was impossible to mouseOver, although it is a spawn of the same actor as the one above:

73838-cursor2.jpg

The same problem applies to mouseClick events, and the actors that have this issue (around 1 in 25) do not seem to follow a pattern - for example, it doesn’t seem to be a matter of position. I am fairly new to Unreal Engine and I do not know how mouseOver region is calculated, any suggestions would be really appreciated!

How are these actors set up, as in what are their root components and how is their collision set up? You could try adding a Box Collision component that encompasses the entire square as part of the object that doesn’t actually any collision, to give bounds to where it can be moused over.

Thank you very much for your reply!
I was also suspecting that the collision had something to do with this… I tried your solution of adding the bounding box in each actor, but it did not seem to fix the issue. The actor setup is the following: each square has two static meshes in its scene, the ground (basically, a plane) and the landscape, which has its own collision bounds (generated by UE4 when I imported the mesh .fbx). I checked the collision bounds (of the meshes) and they seem fine to me (in all cases, it is a rectangle with rounded edges that encompases the whole mesh).

Could it be a matter of camera clipping? Because the same actor can have the issue when it is in the middle of the viewport, while working as expected when not in the middle:

Hm, I didn’t think about camera clipping but that could be possible. I’m assuming you’re using a perspective camera, can you give an orthographic camera a try to see if the issue is the same with that?

Haha, no I use an orthographic camera, with a pretty standard setup. The actor is composed by a static mesh, attached to which is a spring arm, attached to which is the camera. I tried changing the distance of the camera to the landscape, but it does not seem to help.

…aaaand I just found out what the problem was. The static mesh that I used in my camera actor setup was checked to “Hidden in game”, but apparently, and since it was quite big, it was masking mouseover in the center of the screen. I feel like a total idiot. Thank you so much for your input, I would not have found it without you!

Ah, that would do it. I’m glad that you found the issue.

Have a nice day!