Fixing screen height block

I am creating a sprite and placing it on the screen at a specified location. As seen in code below, sprite is supposed to be placed in the center of the screen but for unknown reason, the Y axis positioning is not correct.

image

The x appears in center but Y is way down the screen.

The value seen 640 is the height of the screen so dividing it by 2 should have placed it in center of screen.

Hi @sysads

Are your using relative or absolute sizing for your screen height/width?

Thanks!

1 Like

It’s OK, the way you did puts the corner in the point, not the center of the object. You could put for instance point x= (screen width/2)-(sprite_Type width/2)