I currently have an object consisting of three bodies that form a rigid group on top, with a plate below connected to the ground. The three upper bodies slide on this plate that is connected to the ground. I will apply a horizontal leftward force to the upper rigid group. I have now set a damping for the sliding joint in the global coordinate system's Y‑axis (the direction of motion). What I want to know is how to set this damping such that it is related to the velocity itself. Suppose that when the leftward velocity is less than 0, the damping is 500; when it is equal to 0, it is 500; and when it is greater than 0, it is 1000. I tried expressing this damping value using a function and used the IF function, but it seems that the nesting caused the software to report an error and the simulation cannot continue. Are there any alternative measures? Below is my model.