i need to write a code whichs scales the object after it goes through 500 px, i made this code but it doesnt work:
function localScale( event )
if self.y > 500 then
self.scale(1.10, 1.10)
end
end
what is the problem?
You should give
self:scale(1.10,1.10)
Or you can give
self.scale(self,1.10,1.10)
Also, I think when scaling Physics bodies, only the image is scaled. The Physics body is not scaled. So bear that in mind!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.