The force distribution problem in multilegged vehicles is a constrained optimization problem. The solution to the problem is the setpoints of the leg contact forces for a particular system task. In this paper, the efficient compact QP method which takes into account both the linear and quadratic objective functions is adopted to resolve this constrained optimization problem. Various objective functions such as minimum force, load balance, safety margin on friction constraints can be considered by the compact QP method. This method can also be applied to smooth discontinuities in commanded forces by manipulating the homogeneous solution and including smoothing periods when the leg phase alternates between support and transfer. This smoothing scheme does not require force sensors. Multiple goals which consider several alternative objective functions can also be achieved by the compact QP method.