How to detect touch input on handhelds?
I am trying to handle inputs on a tablet. I have tried implementing a UTouchInterface but there doesn't seem to be any methods which I can override. I have also tried overriding the SWidget's
virtual FReply OnTouchStarted(const FGeometry& MyGeometry, const FPointerEvent& Event) override;
virtual FReply OnTouchMoved(const FGeometry& MyGeometry, const FPointerEvent& Event) override;
virtual FReply OnTouchEnded(const FGeometry& MyGeometry, const FPointerEvent& Event) override;
But instead I am getting a linker issues. If I change my class' API from CLASSNAME_API to SLATE_API the linker issues go away but instead a issue arises in the Microsoft.MakeFile.Targets (error MSB3073: The command ""C:\Program Files\Unreal Engine\4.6\Engine\Build\BatchFiles\Build.bat" " -rocket" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5
Does anyone know how I should go about getting input on a tablet through code without having to add a touch method override to each actor or pawn in the scene?
asked Jan 25 '15 at 03:42 AM in C++ Programming
I assume you solved this as it's old and a sliiiight blocker.
You can trap touches in your PlayerController. You can also grab them in Blueprint which is how I typically push events to my actors.
There are probably other approaches too, especially as I've been using touch interfaces for two years now without ever having to implement a UTouchInterface!
answered Oct 22 '16 at 12:13 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here