void CCharacterMotionControlAppTask::HandleInput( InputData& input )
{
	int action_code = m_pKeyBind ? m_pKeyBind->GetActionCode( input.iGICode ) : ACTION_NOT_ASSIGNED;

	switch( input.iGICode )
	{
	case '1':
		if( input.iType == ITYPE_KEY_PRESSED )
		{
			// toggle camera control
			bool enabled = IsCameraControllerEnabled();
			EnableCameraController( !enabled );
		}
		break;

//	case GIC_MOUSE_BUTTON_R:
//		if( input.iType == ITYPE_KEY_PRESSED )
//		{
//			if( m_pCharacterItems.empty() )
//				return;
//
//			shared_ptr<ItemEntity> pEntity = m_pCharacterItems[0]->GetItemEntity().Get();
//			if( !pEntity )
//				return;
//
//			m_CameraOrientation.target.FromRotationMatrix( pEntity->GetWorldPose().matOrient );
//		}
//		break;

	default:
		break;
	}

	switch( action_code )
	{
	case ACTION_MOV_LOOK_UP:
		if( input.IsMouseInput() && input.iType == ITYPE_VALUE_CHANGED )
		{
			if( m_pThirdPersonCameraController )
			{
				const bool invert_mouse = true;
				const float s = invert_mouse ? -1 : 1;
				const float angle
					= m_pThirdPersonCameraController->GetTargetVerticalAngle()
					+ input.fParam1 * 0.005f * s;
				m_pThirdPersonCameraController->SetTargetVerticalAngle( angle );
			}
		}
		break;

	default:
		break;
	}

	if( m_pThirdPersonMotionController )
	{
		m_pThirdPersonMotionController->HandleInput( action_code, input );
	}

}