Auto-change the physics of an object after a change of his size
snippet in lua

Auto-change the physics of an object after a change of his size

user3514

local scaleFactor = 1.0
local physicsData = (require "shapedefs").physicsData(scaleFactor)
local shape = display.newImage("objectname.png")
physics.addBody( shape, physicsData:get("objectname") )