B2d.body.set_angular_damping() doesn't seem to exist

This code:

function init(self)

	local url = msg.url(nil, "go", "collisionobject")
	local body = b2d.get_body(url)
	b2d.body.set_linear_damping(body, 0.6) -- Works
	b2d.body.set_angular_damping(body, 0.2) -- ERROR:SCRIPT: main/main.script:6: attempt to call field 'set_angular_damping' (a nil value)

end

Results in this error:

ERROR:SCRIPT: main/main.script:6: attempt to call field 'set_angular_damping' (a nil value)
stack traceback:
  main/main.script:6: in function <main/main.script:1>

I’m wondering if b2d.body.set_angular_damping() is missing, since b2d.body.set_linear_damping() works fine?

Defold 1.9.2.

Minimal example:
AngularDamping.zip (1.7 KB)

3 Likes

Thanks!
It’s just an oversight (I tried to verify it visually, but there are just sooo many tiny functions ^^)
Please add a github issue, and we’ll make sure to add it to 1.9.3

3 Likes

Thanks! Added it as a “task” since it’s a known issue. Hope this is ok!

1 Like