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
- 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.
- 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.
Remember to turn it off when not in use.
Good luck!