Type Number Object Body Library physics.* Revision Release 2022.3683 Keywords body, linearDamping See also object:setLinearVelocity() object:applyLinearImpulse() object:applyForce()
The numerical value for how much the body's linear motion is damped. The default is zero (0
).
-- Create a rectangle local myRect = display.newRect( 0, 0, 100, 100 ) -- Add a body to the rectangle physics.addBody( myRect, "dynamic" ) -- Set the rectangle's linear damping myRect.linearDamping = 5