Optimized gravity and friction