Linear velocity on dynamic object is suddenly reduced after some time of not applying any force

Hi all,

After applying force to dynamic body, linear velocity is suddenly reduced after some time, when the force is no longer applied. I have reduced Y gravity to 0 in physics project settings, but otherwise I’m using default values.

I’m quite new to defold so I’m not sure if I’m missing anything, but I didn’t find anything in documentation that would explain it.

Gif of what is happening (white line is linear velocity)

Debug output

I have this script attached to my game object"forward_thrust", 100)

function init(self)".", "acquire_input_focus")
	self.acceleration_forward = vmath.vector3()

function update(self, dt)"#co", "apply_force", {force = self.acceleration_forward, position = go.get_world_position(".")})
	local linvel_color = vmath.vector4(1, 1, 1, 1)
	local forward_color = vmath.vector4(1, 1, 0.2, 1)

	local linvel = go.get("#co", "linear_velocity")
	print(linvel)"@render:", "draw_line", { 
		start_point = go.get_world_position("."), 
		end_point = go.get_world_position(".") + self.acceleration_forward, 
		color = forward_color
	})"@render:", "draw_line", { 
		start_point = go.get_world_position("."), 
		end_point = go.get_world_position(".") + linvel * 5, 
		color = linvel_color

	self.acceleration_forward = vmath.vector3()

function on_input(self, action_id, action)
	local r = go.get_world_rotation()
	if action_id == hash("up") then
		self.acceleration_forward = vmath.rotate(r, vmath.vector3(0, self.forward_thrust, 0))
		if action.pressed then"l_thruster#thruster_particles")"r_thruster#thruster_particles")
		elseif action.released then

I should be on current version

Any idea what might it be happening?

Thank you

And linear damping on the object is set to the default value of 0?

Could you please share a sample project as a zip file here?

yes, I changed only the mass property, all others including linear damping have default values

Here is sample project to reproduce the issue (43.1 KB)