Boat Keeps It's Turn Momentum

Picture this:

I’ve got a boat, and it goes straight just fine. Then I turn it right, which it does. I do a full 90 degree and then decide I don’t want to turn anymore, so I let go. Like in any video game, the boat stops turning and only goes straight. Except it doesn’t, and that’s exactly my problem. It keeps it’s turn momentum and controlling it makes the game feel like a chore. The boat’s seat has a LineVelocity, AngularVelocity, and this very simple script which I’m using to steer it.

script.Parent.Changed:Connect(function()
	script.Parent.AngularVelocity.AngularVelocity = Vector3.new(0, -20 * script.Parent.Steer, 0)
	script.Parent.LinearVelocity.LineVelocity = 120 * script.Parent.Throttle
end)

The problem isn’t that the AngularVelocity doesn’t change when I let go (because it does), but that the boat’s velocity keeps the effects from the AngularVelocity.

1 Like

Print the angular velocity inside the changed event. Does the turning eventually slow?

Yes, the angular velocity changes. The issue is that the part keeps it’s inertia and the updated angular velocity of (0, 0, 0) does not act on it.

It’s also very important that the boat model I’m using has many parts with a low density. Obviously density is important in calculating mass and mass is important in calculating density. I’d imagine that has something to do with it, but setting the parts to massless doesn’t change the turning problem.

1 Like

Oh… I did it… It only took like eight hours.

script.Parent:GetPropertyChangedSignal("Throttle"):Connect(function()
	
	script.Parent.LinearVelocity.LineVelocity = 120 * script.Parent.Throttle
	
end)

script.Parent:GetPropertyChangedSignal("Steer"):Connect(function()
	
	script.Parent.AngularVelocity.AngularVelocity = Vector3.new(0, -script.Parent.Steer, 0)
	
end)

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