UE5 Mouse Track - POE2 Shine

UE5 Mouse Track - POE2 Shine

About

I’ve been playing a lot of PoE2 Early Access, and a detail in one of the UI elements caught my attention. I tried to recreate the same behaviour in Unreal Engine 5.

1. Texture

The HUD component texture is a screenshot from the game. The only custom textures I created are a light texture and a mask for it.

2.Shader

The shader is straightforward: it offsets the UV of the light texture and applies the mask.

3.Widget Blueprint

I created two events:

  • One triggers when the mouse hovers over the widget area. It activates a function for mouse tracking, which updates the material parameters to set the UV offset.

  • The other event stops tracking when the mouse leaves the widget area.