private void SetBoundY() { float bound; float y = m_Player.transform.position.y; float minHeight = m_PlayerController.GetMinHeight(); float height = m_PlayerController.GetHeight(); float minVelocity = m_PlayerController.GetMinVelocity(); float velocityDifference = m_PlayerController.GetVelocityDifference(); bound = y + minHeight + ((m_PushForce - minVelocity) / velocityDifference) * height; m_PlayerController.SetBoundY(bound); }