I’m trying to slow my Model down until it reaches around 200 ish studs. But my model isnt moving at the same speed. Lets say 5000 studs/s x and 3000 studs/s y. I need my model to slow in a sort of curve and not to slow down immediately. I need my x velocity to be around 0 first and for me still to be falling with y velocity. Then I need my y velocity to keep slowing down until i’m falling at around 200 ish studs. I know this is complicated but any help is great.
Try to research about TweenService
, this will help you on how to smoothly change the part’s speed instead of slowing down the part immediately.
Wont work for what I’m using. 30 ch
You can apply a force for a certain amount of time to do this
You can use
F=ma
To calculate how much force you need to accelerate it by a certain rate with a certain mass
You can then calculate how long you need to apply the force by rearranging F=ma a bit
F=ma
F=(m * v)/s
F=(m * (v2-v1))/s
s=(m * (v2-v1))/F
v2 is the magnitude of the goal velocity and v1 is the magnitude of the current velocity
So, apply a force of
F=ma
For a duration of
s=(m * (v2-v1))/F
This is really interesting and makes sense. Few questions though, does s=(m * (v2-v1))/F replace F = MA or is it just the code saying how long we apply F= ma for? And what variable is S?
Its how long you will apply the force calculated using f=ma for, but its also derived from f=ma
The variable s just represents seconds
Ahh makes sense. Final thing I think. How can I add the force in my velocity direction?
local bodygyro = script.Parent.BodyGyro
local part = script.Parent
local velocity = script.Parent:GetVelocityAtPosition(part.Position)
Or will it work regardless?
You would apply the force like:
Force = (currentVelocity-desiredVelocity).Unit * m * a
Thankyou really appreciate it.
Also if you want it to hold the velocity afterwards, not affected by gravity you can apply a constant upwards force of mass * gravity
If youre doing it upwards, against gravity you can use the formula:
F=m*(a+gravity) because gravity applies a downwards acceleration
If its downwards you would just subtract gravity instead
You can also, more easily just add on a force of (0,mass*gravity,0) at the final line where youre multiplying it out
I would do this instead of putting it in the F=ma formula, its more universal
((current-desired) * m * a) + Vector3.new(0,m*g,0)
Alright lol. Its a bit overwhelming for me but I’ll try to construct something. What I’m trying to do is slow my Rocket down on reentry. Although this isnt the most realistic way its easier than something like tweening service. Thanks so much all this info is really useful.