I’m not very good with linear velocity and I’m wondering how do I fix this wobbling that happens when I apply velocity to the model? Every part in the model is welded to to the primarypart.
https://drive.google.com/file/d/1Lf1GMOsTwFVrLA35lEZtIBhgymdtAy-2/view?usp=sharing
If could be that the force is not being applied at the center of mass, you can try getting AssemblyCenterOfMass of the rootpart of the model and set the LinearVelocity attachment to that position. If that doesn’t work you could AlignOrientation
Here’s what’s happening:
-
LinearVelocity overrides the velocity of the object. This means that if you have the velocity set to 0, your object will stay in place even if it’s in the air.
-
When this is the case, this LinearVelocity essentially acts as an AlignPosition, but at the current point the object is at. Your object will appear to be stuck in the same spot in the air.
-
Since your rocket model is bottom-heavy, gravity will affect the lower half of the rocket more. If your rocket is tilted, the lower part of the rocket will pull down with greater force compared to the top.
-
LinearVelocity doesn’t affect the angular momentum of the object, so your rocket enters a pendulum motion, swinging back and forth.
To demonstrate I did a quick test with a bottom-heavy model (metal part welded to the base) and LinearVelocity constraint set to 0 velocity.
Like @Razor_IB suggested, there are a few different solutions:
Solution 1
- Set the Attachment that your LinearVelocity is linked to’s Position to the exact centre of mass of the whole model.
VelocityAttachment.WorldPosition = rocket.PrimaryPart.AssemblyCenterOfMass
Solution 2
- Add an AlignOrientation constraint to your rocket. This will override the direction that your rocket is facing, so you can script it to control which way your rocket faces.
Solution 3 (a suggestion of mine)
- Create an invisible “Physics Root” part and weld it to the centre of your rocket. Set ALL of the other parts in the rocket to
Massless = true. This one central part defines the mass of the whole object, which you can customise by changing the part’s CustomPhysicalProperties.
- Put your LinearVelocity & linked attachment inside this physics root part.
- This allows you to change the shape of your actual rocket, but the weight/centre of mass will not be affected.
Thanks solution 3 ended up working for me
I switched to solution 1 and the rocket is spinning wildly how would i fix this?
https://drive.google.com/file/d/11bTlTHC8zw9qiTwnfkwwa6QeGbg728LQ/view?usp=drive_link
I’m using align orientation with linear velocity.
Lmaoo that’s crazy, how did you set it up? How are you controlling the angle of AlignOrientation? And also, what are you trying to achieve exactly? As in, do you want the player to control the direction the rocket is going in using the keyboard?
local forward = self.Spaceship.PrimaryPart.CFrame.LookVector
local position = self.Spaceship.PrimaryPart.Position
local uprightCF = CFrame.lookAt(position, position + forward, Vector3.new(0, 1, 0))
self.AlignOrientation.CFrame = uprightCF
This is in a renderstepped.
Yeah I’m trying to make them use the keyboard to control the rocket.
I think what’s happening is that your CFrame logic is slightly wrong. Looking at how your rocket is spinning rapidly, it may be that your script is updating the AlignOrientation’s target CFrame constantly to the left/right/back of the PrimaryPart’s current lookvector.
It’s possible that the Attachment (that the AlignOrientation is linked to) is rotated to a 90° or 180° angle relative to Spaceship.Primarypart.
I suggest you change self.Spaceship.PrimaryPart.CFrame.LookVector to alignOrientationAttachment.WorldCFrame.LookVector when getting forward & position.

