Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make a car/union type vehicle not flip over?

Asked by 3 years ago

Hi. I'm making a ramp thingy, where you ride a cart kind of vehicle down it. Thing is, I have a conveyer belt to help it go up some ramps, so it makes it go really fast and bump into the walls (i have barriers). This causes the cart to go out of control, and most of the time flip upside down. I want to prevent it from doing that, and I have tried using BodyGyro from some answers online, but it does not let the vehicle rotate at all, which is what I don't want. I just want to prevent it from flipping over, not stop it from rotating in general. Any suggestions?

1 answer

Log in to vote
1
Answered by
Speedmask 661 Moderation Voter
3 years ago
Edited 3 years ago

I know somebody who did this using AlignOrientation. you can change around the force so that it will always automatically rotate back onto its feet. just align it with some invisible part that is always upright relative to the car, kind of like a gyroscope. I have never attempted this but I think you can math.clamp this part's orientation so that it follows the car, but never flips over, and the car will turn back smoothly.

0
Thank uuuuuuu Omq_ItzJasmin 666 — 3y
Ad

Answer this question