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)