Boat is drifting forward when steered

i was trying to apply force to the look vector of my vehicle seat so that the force would be applied to where the boat is facing but the boat just drifts forwards when i turn. i have included a vid at the bottom.

also if anyone has any efficient ways for making the boat stop when the player isnt using the throttle float, i would greatly appreciate it. tysm!

function boat:HandleThrust()
	local rs = game:GetService("RunService")

	if not self.connection then
		self.connection = rs.Stepped:Connect(function(dt)
			local velocity = self.vehicleSeat.AssemblyLinearVelocity
			local speed = velocity.Magnitude

			if self.vehicleSeat.SteerFloat ~= 0 then
				self.rotation.Torque = Vector3.new(0, (self.TotalMass * -self.vehicleSeat.SteerFloat) * 15, 0)
				print(self.rotation.Torque)
			else
				self.rotation.Torque = Vector3.zero
			end

			if self.vehicleSeat.ThrottleFloat ~= 0 then
				print(speed)
				self.thrust.Force = self.vehicleSeat.CFrame.LookVector.Unit * self.TotalMass * self.vehicleSeat.ThrottleFloat * 5

				if speed >= self.config:GetAttribute("MaxSpeed") then
					self.drag.Force = Vector3.new((self.vehicleSeat.ThrottleFloat * self.TotalMass) * -5,0,0)
					--print({"thrust: ", self.thrust.Force,
					--	"drag: ", self.drag.Force
					--})
				else
					self.drag.Force = Vector3.zero
				end
			else
				self.drag.Force = Vector3.zero
				self.thrust.Force = Vector3.zero
				self.vehicleSeat.AssemblyLinearVelocity = Vector3.zero
			end
		end)
	end
end
1 Like

Is the force already relative to the seat? If it is and you use the seat’s lookVector, you will either double or cancel out the rotation which could cause what youre seeing.

2 Likes

hey azq, tysm for ur help.

so i have the vectorforce relative to the world and it is parented to my vehicle seat.

image

and the force’s attachment:

i also have the relativeTo set to world for my torque (rotation)