Search public documentation:
Last tested against UDK May, 2012
This starter kit also comes with another type of interface which allows the game to be controlled via a touch pad. This is automatically used when either the platform is forced to be Mobile (done by setting the debug option in UDKMOBAMapInfo) or by running the game on an mobile device such as an iPad2. Having the game controlled presents many problems as the only real information you can deduce from touch events are related to positions or to movements of the same touch event. Thus, the touch pad interface is not merely a mapping of the keyboard and mouse to the touch pad. It was also desired not to simply solve this by using directional virtual pads. Thus, a new set of classes were created to interpret the touch pad and present a simpler interface to players. Because a simpler interface is required, the in game UI also had to change accordingly.
- PostRender() - This event is called every frame by the engine to update the HUD. This calls UDKMOBAHUD_Mobile::ProcessTouchEvents().
- ProcessTouchEvents() - This function iterates over the UDKMOBAPlayerController_Mobile::TouchEvents array and looks for touch events that had not yet been processed. If they haven't been processed, then UDKMOBAPlayerController_Mobile::HandlePendingRightClickCommand() is called and then flagged as processed.
This class handles the main touch interface by using the native delegates provided via MobilePlayerInput::OnInputTouch(). This delegate is bound when the input system has been initialized. This delegate is unbound when the player controller is destroyed. The player controller must be in the PlayerCommanding state, as the function that is bound to MobilePlayerInput::OnInputTouch() is simply a stub outside of this state.