UDN
Search public documentation:
MOBAKitKBMouse
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
MOBA Starter Kit - Keyboard and Mouse
Last tested against UDK May, 2012
Overview
On the PC platform, the MOBA Kit by default uses the keyboard and mouse as the primary interface. Two main classes are involved for the PC platform, one being the PC specific HUD class and the other being the PC specific PlayerController class. The PlayerController class mostly handles the keyboard interactions while the HUD class mostly handles the mouse interactions.
UDKMOBAHUD_PC
Functions
- PostRender() - This is called every frame to render the HUD. This calls UDKMOBAHUD_PC::ProcessCommands().
- ProcessCommands() - This processes input when Canvas is valid. If Scaleform requires the inputs, then either UDKMOBAGFx_HUD::HandlePendingLeftClickCommand() or UDKMOBAGFx_HUD::HandlePendingRightClickCommand() will be called, otherwise UDKMOBAPlayerController_PC::HandlePendingLeftClickCommand() or UDKMOBAPlayerController_PC::HandlePendingRightClickCommand() will be called.
UDKMOBAPlayerController_PC
Functions
- IsHUDCapturingMouseInput() - Returns true if the HUD is currently capturing the mouse input or not. This prevents the mouse from being captured and processed from multiple places.
- StartFire() - This is usually bound to the left and right mouse button. This just sets UDKMOBAHUD_PC.PendingLeftClickCommand or UDKMOBAHUD_PC.PendingRightClickCommand, which are then later processed.
- HandlePendingLeftClickCommand() - This processes left mouse click which is usually used for pinging on the mini map or drawing on the mini map.