I would like to edit the default Virtual Joystick für my game. I want to archive to move the center of the joystick at runtime. It should finterp-follow the players-finger.
The problem: I cannot cast in any way to this joysticks x/y position, i cannot add custom joysticks at runtime, so i think the only way to archive this is somehow with c++.
But I’m a total noob at c++, so can you give me a hint like what files i may need to edit, and how i can access is later via BP? I only want to change this two variables (centerX, centerY).
It’s critical for my game, so i hope you can help me…
THANKS!!
EDIT:
“\Epic Games\UE_4.18\Engine\Source\Runtime\Engine\Private\GameFramework\Touchinterface.cpp”
I think I’ve found the right file. Inside there is the method “void UTouchInterface::Activate(TSharedPtr<SVirtualJoystick> VirtualJoystick)”. I know there is an “Activate Touch Interface” Node in Blueprint. Is this related? Does this mean I can simply add my own methods in this file and they will auto generate a blueprint node? Or have i to build the whole engine after i changed this?
How can i change the value of SlateControl->Center?
SlateControl->Center = {x,y} or do i need something like this:
SlateControl->Center = SlateControl::MakeCenter(x,y)
i know thats a lot of questions. Sorry.