Download

Input plugin problem: the input and output interface

Hi, unreal gurus,

Recently, I’m doing a new virtual sticks input plugin in order to add some special event.
I did a third-person melee fighting prototype before in BluePrint, and had some experience with C++.

But after reading some documents and code on GitHub.
I have few questions left before I dive deeper:

  1. Where is the default virtual sticks source code? I would like to have the official sample of input plugin source code as reference.
  2. The FGenericApplicationMessageHandler mentioned here is actually the output for the plugin to inform the input event to engine itself, right?
  3. If I want to read the raw input of touch input state, should I go with APlayerController::GetInputTouchState() ? If so, how should I retrieve a reference of APlayerController? Or is there other recommended approach?

Thank you for any suggestions.

Hi, Unreal gurus

I have tried the best to help myself.

About how to read raw input of mobile touch location, I found that I had a problem with world reference
Something like
playerController = TSharedRef<APlayerController>( UGameplayStatics::GetPlayerController( ???, 0 ) );
I hope I can reach the input component of playerController, but I don’t know what to fill in world reference for a plugin.

May someone give me some hint at least, please?

A world reference is anything in the game world. If you save a reference to the player’s actor that will work.