Change shape height after creation

I’m unable to change a rectangle “height” property after creating it, but I can change its width fine.

local rec = display.newRect( sceneGroup, 500, 500, 2,  -700 ) -- height is -700, width is 2     rec.anchorY = 0     rec.anchorX = 0     rec.height = -200     rec.width = 10

When I run the app, the width becomes “10”, but the height stays the same which is “-700”

What  am I missing  here ?!

Why are you trying for a height below 0? Maybe the height can’t be below 0 normally but there is a chance that it accepts upon creation.

That’s actually right, thanks. 

You can’t have a negative height object (or negative width). It’s likely the code that’s running behind setting the height/width is checking the value an throwing away negative values.

Rob

Why are you trying for a height below 0? Maybe the height can’t be below 0 normally but there is a chance that it accepts upon creation.

That’s actually right, thanks. 

You can’t have a negative height object (or negative width). It’s likely the code that’s running behind setting the height/width is checking the value an throwing away negative values.

Rob