help me with jumping implementation: void Player::Update(float deltaTime)
{
    Timer& timer = Timer::getInstance();
    timer.update();
    double elapsedMilliseconds = timer.getElapsedTimeMilliseconds();
    //deltaTime *= 30;
    
    switch (m_state)
    {
    case PlayerState::STANDING:
        HandleStanding(deltaTime);
        break;
    case PlayerState::JUMPING:
        HandleJumping(deltaTime);
        break;
    case PlayerState::FALLING:
        HandleFalling(deltaTime);
        break;
    case PlayerState::LANDING:
        HandleStanding(deltaTime);
        break;
    default:
        break;
    }

    if (isPlayerInAir())
    {
        if (m_state != PlayerState::JUMPING)
        {
            SetState(PlayerState::FALLING);
            std::cout << "Transitioning to FALLING state in Update." << std::endl;
        }
    }
    if (isPlayerInAir() && m_moveSpeed.y > 0.25f)
    {
        float airResistance = powf(0.95f, deltaTime);
        m_moveSpeed *= airResistance;
        std::cout << "Applied air resistance. New m_moveSpeed: " << m_moveSpeed.y << std::endl;
    }

    if (isPlayerInAir())
    {
        ApplyGravity(deltaTime);
        ApplyAirResistance(deltaTime);
    }
   
    glm::vec3 newPosition = GetPosition(); 
    newPosition += m_moveSpeed * deltaTime; 
    SetPosition(newPosition);
}

bool Player::isPlayerInAir()
{
    glm::vec3 playerPosition = GetPosition();
    glm::quat playerRotation = GetRotation();

    glm::vec3 downDirection(0.0f, -1.0f, 0.0f);
    float maxFallDistance = 1000.0f; 
    glm::vec3 raycastOrigin = playerPosition + glm::vec3(0.0f, 0.1f, 0.0f);
    auto fallResult = m_world->PlayerBoxRaycast(raycastOrigin, downDirection,
        maxFallDistance, m_playerDimensions, playerRotation);

    if (fallResult.hit)
    {
        if (fallResult.distance <= m_groundThreshold)
        {
            return false;
        }
    }
    return true;
}

glm::vec3 Player::GetGroundPos()
{
    glm::vec3 playerPosition = GetPosition();
    glm::quat playerRotation = GetRotation();

    glm::vec3 downDirection(0.0f, -1.0f, 0.0f);
    float maxFallDistance = 1000.0f;
    glm::vec3 raycastOrigin = playerPosition + glm::vec3(0.0f, m_groundThreshold, 0.0f);
    auto fallResult = m_world->PlayerBoxRaycast(raycastOrigin, downDirection,
        maxFallDistance, m_playerDimensions, playerRotation);

    if (fallResult.hit)
    {
        return fallResult.hitPoint;
    }
    return { 9999.0f, 9999.0f, 9999.0f };
}

void Player::ApplyGravity(float dt)
{
    m_moveSpeed.y -= 0.008f * dt;
}

void Player::ApplyAirResistance(float dt)
{
    if (m_fAirResistance > 0.1f) {
        float f = powf(m_fAirResistance, dt);
        m_moveSpeed *= f;
    }
    else {
        float magnitudeSqr = glm::length2(m_moveSpeed);
        float f = powf(1.0f / abs(m_fAirResistance * 0.5f * magnitudeSqr + 1.0f), dt);
        m_moveSpeed *= f;
    }
}

void Player::ApplyMoveForce(glm::vec3 force)
{
    m_moveSpeed += force * (1.0f / 70.0f);
}

void Player::Jump()
{
    if (m_state != PlayerState::JUMPING && !isPlayerInAir()) {
        SetState(PlayerState::JUMPING);
        ApplyMoveForce(glm::vec3(0.0f, 8.5f, 0.0f)); // Apply jump force on Y-axis
        std::cout << "Jump initiated!" << std::endl;
    }
}

void Player::HandleStanding(float dt)
{
}

void Player::HandleFalling(float dt)
{
    glm::vec3 pos = GetGroundPos();
    float dist = glm::distance(pos, m_position);
    if (dist >= 1000.0f)
    {
        std::cout << "Player under map! Hit Pos: "<< 
            pos.x << " " <<  pos.y  << " " <<  pos.z << std::endl;
        m_moveSpeed = { 0.0f, 0.0f,0.0f };
        SetPosition({ -15.3375, 17.5399 , 69.3102 });
    }
    else {
        if (dist <= m_groundThreshold)
        {
            m_moveSpeed = { 0.0f, 0.0f,0.0f };
            SetPosition(pos);
        }
    }
}

void Player::HandleJumping(float dt)
{
    //glm::vec3 pos = GetGroundPos();
    //float dist = glm::distance(pos, m_position);

    if (isPlayerInAir())
    {
        glm::vec3 eulerAngles = glm::eulerAngles(m_rotation);
        float angleSin = sin(eulerAngles.y);
        float angleCos = cos(eulerAngles.y);
        ApplyMoveForce({ -angleSin * 3.0f, 0.05f, 3.0f * angleCos });
        std::cout << "Applied move force during jumping." << std::endl;
    }

    /*if (dist <= m_groundThreshold)
    {
        SetState(PlayerState::STANDING);
        m_moveSpeed = { 0.0f, 0.0f,0.0f };
        SetPosition(pos);
    }
    else {
        
    }*/
}