# How do I keep the momentum of an object?

I want to make an object that has different momentums, a bit like this illustration.

As you can see from the image, the foward momentum is bigger than the side momentum, so the object would keep sliding foward for longer than it’d be sliding sideways.
I think I could use body thrusters, but I don’t know which formula I should exactly use.

1 Like

In statics forces are typically separated into x and y components, ex

Because roblox uses vectors you can skip all of the trig you usually have to do to get something like this and you can just average the two vectors to find the cumulative force and plug that directly into a bodyforce.

So basically you just take the two force vectors and average them to get a force.

2 Likes

I’m sorry, but I don’t quite understand what you mean (I guess it’s my english)
Would this explain how to use the body force to keep the momentum of an object, or calculate the momentum of an object?

You could either (both probably using a LineForce on an Attachment):

• Boost the object forward based on its velocity (part.Velocity:Dot(part.CFrame.LookVector))
Be careful not to make this a feedback loop
• Slow the object’s travel from side to side, emulating friction (part.Velocity:Dot(part.CFrame.RightVector))
The Dot will go negative if the object is travelling left, so simply have the force pointing left, and it can have a negative force when you need to push it right.
This is probably what you want. Boosting the object forward will cause weird things.

I’m not a big fan of theoretical mathematics involving complicated vector stuff. The two solutions I’ve listed are practical ones that are simple to understand and work fine on Roblox. `:)`

If you want, I could try to make you a PoC place.

2 Likes