 
     // Create the UI content
     CreateInstructions();
+
+    // Activate mobile stuff when appropriate
+    if (GetPlatform() == "Android" || GetPlatform() == "iOS")
+        InitTouchInput();
 
     // Subscribe to necessary events
     SubscribeToEvents();

    if (character is null)
        return;

    // Get movement controls and assign them to the character logic component. If UI has a focused element, clear controls
    if (ui.focusElement is null)
    {
        character.controls.Set(CTRL_FORWARD, input.keyDown['W']);
        character.controls.Set(CTRL_BACK, input.keyDown['S']);
        character.controls.Set(CTRL_LEFT, input.keyDown['A']);
        character.controls.Set(CTRL_RIGHT, input.keyDown['D']);
        character.controls.Set(CTRL_JUMP, input.keyDown[KEY_SPACE]);

        // Add character yaw & pitch from the mouse motion
        character.controls.yaw += input.mouseMoveX * YAW_SENSITIVITY;
        character.controls.pitch += input.mouseMoveY * YAW_SENSITIVITY;
        // Limit pitch
        character.controls.pitch = Clamp(character.controls.pitch, -80.0f, 80.0f);

        // Switch between 1st and 3rd person
        if (input.keyPress['F'])
            firstPerson = !firstPerson;

        // Check for loading / saving the scene
        if (input.keyPress[KEY_F5])
        {
            File saveFile(fileSystem.programDir + "Data/Scenes/CharacterDemo.xml", FILE_WRITE);
            scene_.SaveXML(saveFile);
        }
        if (input.keyPress[KEY_F7])
        {
            File loadFile(fileSystem.programDir + "Data/Scenes/CharacterDemo.xml", FILE_READ);
            scene_.LoadXML(loadFile);
            // After loading we have to reacquire the character scene node, as it has been recreated
            // Simply find by name as there's only one of them
            characterNode = scene_.GetChild("Jack", true);
            if (characterNode is null)
                return;
        }
    }
    else
        character.controls.Set(CTRL_FORWARD | CTRL_BACK | CTRL_LEFT | CTRL_RIGHT | CTRL_JUMP, false);

    // Set rotation already here so that it's updated every rendering frame instead of every physics frame
    characterNode.rotation = Quaternion(character.controls.yaw, Vector3(0.0f, 1.0f, 0.0f));


    // Subscribe to PostUpdate event for updating the camera position after physics simulation
    SubscribeToEvent("PostUpdate", "HandlePostUpdate");

    // Sbscribe to mobile touch events
    if (GetPlatform() == "Android" || GetPlatform() == "iOS")
        SubscribeToTouchEvents();
}

void HandleUpdate(StringHash eventType, VariantMap& eventData)
