Hi all
I am learning Unreal and working on an RTS style project. I was trying to figure out the best way to set up my mouse interaction system and the number of disparate options is confusing me. I want the below functionalities:
- Cursor always visible
- Actor hover - highlights
- Actor click - selects actor
- Selecting actor and move mouse - moves actor
- Click RMB and drag - pan camera
- Click MMB and drag - pitch and yaw camera
- Edge panning
- HUD Click - select item or option from HUD
- Open, navigate and click on pause menu
Implementing the first 3 was pretty simple by turning on the options in the Mouse Interface
of my player controllers Class Defaults
. But now that I want to use the mouse movement and non-actor interactions to perform custom logic, I am facing mouse capture issues, especially when the cursor is set to visible.
I have been through a lot of forum posts that discusses this issue but a lot of them use older axis inputs and I want to use only enhanced inputs. Moreover, in 5.3, we have newer system like the CommonUI
that most older posts don’t talk about.
My question is what systems I should work with and which systems should I stay away from if I am building a game using the latest tools and not the older ones. For e.g. is configuring the Mouse Interface
in my player controller a good idea or should I just leave it at defaults and implement the actor hover and actor click functionality some other way.
P.S. I am restricting myself from using older tools as I don’t want to get myself tied up with features a couple of years down the line. Moreover, I am restricting myself from abusing Tick
. I want to use Tick
for things that I know will run throughout the game and not for things that have events associated with them, like mouse movements.
I believe these self-imposed restrictions will also help me in learning Unreal better.