The solution to the failure of UE4 mouse over event

Keywords meaning:

The UE4 mouse event fails, the On Begin Cursor and On End Cursor Over events of the static mesh and collision body fail, and there is no response.

Problem phenomenon:

There is a home improvement project, the mouse passes over the chair, and the chair changes color. Move the mouse out of the chair and the color returns.
However, this morning, I found that the mouse event failed. The pass through and move out events are not responding.

analyze

  1. Checked whether there is a UI blocking the mouse, and found that the blank areas in the UI are both Not Hit-testable (self-only) and Not Hit-testable (self-All Children), which means that there is no collision in the UI blank area.
    insert image description here
    insert image description here
  2. Checked each blueprint and found that a key setting was missing, Enable Mouse Over Events , which was not turned on.

Solution:

Add the following blueprint in the playercontroller blueprint. Enable Mouse Over Events . Enable various mouse Over events.
insert image description here
Remember to turn it off when not in use.
Good luck!

Guess you like

Origin blog.csdn.net/leelizc/article/details/130495611