Hello! I’ve got a local multiplayer game and I’m trying to implement virtual cursors to have a character select screen akin to something like Smash Bros, where up to 4 players are able to control cursors on screen. However, this has been pretty tricky.
It appears as though Unreal doesn’t allow for multiple cursors – despite there being a concept of “Faux Slate Cursors” within the engine (Defined in SlateApplication.cpp, it’s a subclass of ICursor), users (FSlateApplication::RegisterNewUser), and IInputProcessors which appear to imply that you can have multiple “input processors” existing at once for different users.
However, it does not appear there’s a way to utilize any of this to create multiple virtual cursors for users to use to interact with. All IInputProcessors are all passed in the same cursor on tick.
The alternative is to hack it together in UMG, but therein lies another problem: I can’t seem to find a way to poll/hittest UMG widgets, which stops me from detecting if a UMG “cursor” is overlapping an interactable UMG widget.
The last option I’ve considered/prototyped was to copy UWidgetInteractionComponent, and create a component for managing a virtual cursor. I also created a new Slate button that passes along the VirtualUserIndex of the player who interacted with it. This has been the most successful so far, but it also feels pretty dirty.
tl;dr
Is there any built in way to do multiple cursors? It seems like there’s tools for it that just aren’t implemented. If not, does anyone have any resources on how to simulate cursors? (e.g. Hit testing for UMG or just other implementations)
Thanks!