Setting the middle of the screen as the origin

When I load an image with NewImageRect it places the image centre at 0.0

I recall there was a way to set it so that when the image loads it’s centred on the X axis.

Or am I going mad?!

Um, I think you’re going mad. You can set the image to the center of the screen immediately after it loads or, if you know the size of the image beforehand, you can just set it’s loading position to be minus half its size. Other than that, I don’t think so.

Though, please, if you find out, write it here!

create a display group and position its top left corner in the middle of the screen. and then put all your display objects in there. Then point 0,0 will be the center of the screen :slight_smile:

I was thinking of setReferencePoint but thanks.

Using a display group positioned with 0,0 at the screen center will cause images loaded into that group without a x,y values to have the top left corner initially in the center of the screen.

Um, I think you’re going mad. You can set the image to the center of the screen immediately after it loads or, if you know the size of the image beforehand, you can just set it’s loading position to be minus half its size. Other than that, I don’t think so.

Though, please, if you find out, write it here!

create a display group and position its top left corner in the middle of the screen. and then put all your display objects in there. Then point 0,0 will be the center of the screen :slight_smile:

I was thinking of setReferencePoint but thanks.

Using a display group positioned with 0,0 at the screen center will cause images loaded into that group without a x,y values to have the top left corner initially in the center of the screen.