I’m trying to create a virtual joystick (SVirtualJoystick) in my Slate widget so I can use the joystick and my slate widgets at the same time.
Here’s the code I’m using at the moment:
+ SOverlay::Slot()
.Padding(FMargin(20))
.HAlign(HAlign_Center)
.VAlign(VAlign_Bottom)
[
SAssignNew(mobileJoystick, SVirtualJoystick)
]
];
FStringAssetReference TestInterfaceName = FStringAssetReference("/Game/Test2Touch.Test2Touch");
if (TestInterfaceName.IsValid())
{
UTouchInterface* TestInterface = LoadObject<UTouchInterface>(NULL, *TestInterfaceName.ToString());
// activate this interface if we have it
UTouchInterface* DefaultTouchInterface = LoadObject<UTouchInterface>(NULL, *DefaultTouchInterfaceName.ToString());
if (TestInterface != NULL)
{
TestInterface->Activate(mobileJoystick);
}
}
When I debug all the checks are ok and it fires the Activate function, but nothing shows up on screen.
I’ve set the Input-Mobile settings to always show the touch interface but not to have a default, so it doesn’t overlay my own interface.
Anyone know how to do this?