Vector2 Controller::MakeLookDisc(const Mathematics::Vector2 p_ScreenCentre) const { Vector2 ret = m_States.MouseAndKeyboard().Position - p_ScreenCentre; ret = (ret.LengthSquared() > deadDist * deadDist) ? ret : Zero2(); //ret += m_States.Gamepad().RightStick; return ret.IsAtOrigin() ? Zero2() : ret.Direction(); }
Vector2 Controller::MakeMoveDisc() const { Vector2 ret = Zero2(); ret(0) = MakeAxisFromKeys(KeyboardKey::A, KeyboardKey::D); ret(1) = MakeAxisFromKeys(KeyboardKey::S, KeyboardKey::W); ret += m_States.Gamepad().LeftStick; return ret.IsAtOrigin() ? Zero2() : ret.Direction(); }