Hi,
I’m making a Top-Down shooter hobby project. I decided to port it to the Lyra starter game to reuse a lot of its handy stuff, but since around hundred hours of learning and porting the basic things, I completely got stuck with mouse-related questions.
So far, in Lyra, I have custom Top-Down camera mode, custom Gameplay Experience, Player Controller and HeroComponent intended to move/aim with mouse and gamepad.
I can’t however, reliably display the mouse pointer.
Showing the cursor using the controller was my temporary solution in times of UE4. but it does not work in Lyra. Trying to hack it, I found out that mouse capture conflicts with cursor displaying, and disabling mouse capture leads to problems with mouse click handling. Thus it looks like I’m breaking the project instead of using it right way, so I decided to move to the software cursor or a HUD with a separate item that shows the mouse position.
The problem there is that I just can’t find neither examples nor entry point for learning.
Plain UE5/UE4 tutorial does not work in case of Lyra/CommonUI, and my solution is just does not work as well.
Regarding the software cursor: it just does not show up.
Regarding the HUD: as far as I understand recommended way from Epic’s videos, I have to add a HUD layer and layout for my aim HUD, then place widget there. The problem is that widget position is fixed and it even ignores SetPositionInViewport. Specifically, it updates the position but just ignores it later. Having a decent ability to debug and analyze C++ code I just have no idea about further steps to solve the problem.
Could anyone give me a hint in the right direction, please?
Feels like it should not have taken a dozens of hours to get it working, so I think I’m missing something.