How do you limit the velocity of a part/force of a vectorforce?

hello. i’m currently working on my fpv drone system, which is turning out well.
ive ran into a small problem with the speed of the drone and i’ve been stuck on it for hours:

with the specific method that i’m using to handle throttle i am not able to cap the velocity of the drone, which results in infinite speed, without any control.


the drone speeds up fine, but doesn’t stop. even if you havent worked with actual drones before, you can tell that it gets way too quick.

i am using a vectorforce, and changing the force based on my throttle.

i’ve seen in the drone system @5uphi made, the problem appears to be fixed there.

is there a way to slowly drop off on the vectorforce as my net force gets higher?
if that doesnt work, is there a way to cap my velocity to stop speeding up after a certain speed?

any help is appreciated.

You can use math.clamp to limit numbers in your calculations.

that’s not the problem.
my vectorforce is applying a constant force, there aren’t any numbers that change based on my speed that i can clamp to fix my problem.

You can add a dragforce to stop the acceleration.

1 Like

thanks. a modified version of your solution ended up working perfectly

1 Like

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