类型 数字 对象 Body 库 physics.* 修订 版本 2024.3703 关键词 body、linearDamping 另请参见 object:setLinearVelocity() object:applyLinearImpulse() object:applyForce()
数值,代表身体的线性运动阻尼量。默认值为零 (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