Can someone verify this code for me please :)

Think there may be a bug in the latest 2.0 builds.  If I run this code:

local c = display.newCircle(100, 100, 50) timer.performWithDelay( 1000, function() c.width = c.width+1 c.height = c.height+1 print(c.width, c.height) end, -1)

The printed width and height values don’t update/change.  If I run it in older builds they do.  Please could someone just double check for me :slight_smile:

Thanks!

Well the circle is certainly getting larger.  I’m not sure this is the best way to scale a circle. Try this instead:

local c = display.newCircle(100, 100, 50) print(c.path.radius) timer.performWithDelay( 1000,         function()                 c.path.radius = c.path.radius + 2                 print(c.width, c.height)                 print(c.path.radius)         end, -1)

Ah cheers Rob, I hadn’t seen that way of getting the radius before.  Previously .width and .height had always returned the correct values.

Well the circle is certainly getting larger.  I’m not sure this is the best way to scale a circle. Try this instead:

local c = display.newCircle(100, 100, 50) print(c.path.radius) timer.performWithDelay( 1000,         function()                 c.path.radius = c.path.radius + 2                 print(c.width, c.height)                 print(c.path.radius)         end, -1)

Ah cheers Rob, I hadn’t seen that way of getting the radius before.  Previously .width and .height had always returned the correct values.