I had been using blueprints to program the player controller for my game. I needed to use multiple touch inputs, and I had defined a function as follows:
The objective was to store the touch location for the last frame so that I can use functionality that requires dragging with one or two fingers.
At a later stage in development, I had to add multiplayer system to my game, and it proved to be difficult using Blueprints, hence I decided to convert the BPs I had made into C++.
It was going fine until I had to use the APlayerController::GetTouchInputState function (the same one that I had used in the BP). I tried the following:
The AFightPC class derives from APlayerController. However, when I execute this, no matter if I am touching (clicking the screen, I have simulate touch enabled) or not, it always displays false for both fingers.
What am I doing wrong? The same logic works fine with BP so I’m really confused about what might be causing the issue.
Any help or suggestions will be appreciated. Thank you.