[Solved]How does one place Spatials near the edge of the screen?

Hey everyone,

Having finished the tutorials, I thought I’d throw together a Pong-esque game to get the hang of the basics. Currently, I’m trying to place a paddle (A Geometry) on the edge of the screen. I’m trying to use settings.getHeight() and .getWidth() so that the paddles are consistently placed regardless of the resolution the game is played at, but that doesn’t work. I think it’s because I need to somehow get the height and width into world units (but this is just a thought).

Can anyone help me do this?

Thanks in advance,



Hmmm, so right now I’m thinking, “Do I really want this?”. I’m thinking that larger screens will have an advantage because there will be more distance for the ball to traverse before getting to the edges. I guess I could scale the speed depending on resolution, but this seems odd. What do other people think?

Thanks guys,


The resolution of the screen doesn’t actually change how many objects fit on the screen, as world coordinates are converted to -1,-1 - 1,1 range. You can see for yourself by trying the demos, the objects will appear larger.

However what you should worry about is aspect ratio, there will be differences if you’re playing in standard (4:3) or widescreen (16:9) ratios.

Ooooh, well look at that. Thanks Momoko :slight_smile:

Since you say I need to worry about aspect ratio, how does one usually take that into account?

The way it works right now, when you go from 4:3 and 16:9 aspect ratio, you can see the sides more, e.g.:

Ah okay, thanks!