How would I implement brakes?

I have a cart in my game, and it only moves using physics, so by going downhill, (like an alpine slide; it’s similar to the cart in the game “alpine slide into telamon”), and i’d like to have to ability to brake. i’m not very advanced at scripting yet, so my apologies if this is easy to do!

1 Like

You can use friction if you use physics, set wheel’s friction to very high number soo it will don’t slide

Play around with the HingeConstraint MotorMaxTorque and MotorMaxAcceleration.
If your values are too high as soon as you input reverse (braking) the wheels spin instantly backwards.
If you decrease the MotorMaxAcceleration it’ll take a while for the cart to accelerate to speed going forward or reverse, which is realistic, and when you put in the opposite command it’ll take a while to slow down, then reverse, which is realistice as well.

every time i try, it either says “friction cannot be applied to” or just doesn’t work at all, do you have any idea how to fix this

then maybe add counter force soo car will don’t move

EDIT: You can maybe add very heavy part colliding with terrain but not car and terrain to car

I’ve got it working! If anyone else encounters this problem, linear velocities ended up working

You could have just set the Friction of the Parts manually and the HingeConstraints forces. It works rather well when you balance them.

ah okay, thanks, i’ll come back to this if i have trouble with the current brakes

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.