Setting Anchor Points of 3D Objects

I’m trying to make a grid of cubes for a 3D game, and render them starting from the bottom left hand corner of the screen. I make my cubes in scripts by instantiating them at run-time.

Currently my cubes always render from the center of the screen, so I assume this is because they are anchored to the centre of the screen?

As I am developing for mobile, what I want to do is always render from the bottom left hand corner of the screen. I also want to scale the cubes so that they automatically fit the screen display I am using. I always have the same number of cubes horizontally and vertically, but the screen size could differ.

Is it possible for anyone to help out a noobie?

Yes, you’re on the right track. If you want to work from the bottom-left, then make sure your anchors (both min and max) are set to 0 in both X and Y. You’ll probably want to set the pivot to 0,0 as well (this determines what point on each cube is positioned at the point you specify relative to the anchors).

Oh, wait. You’re talking about 3D positioning (Transform rather than RectTransform).

In that case, simply move the camera!

Where should I be moving the camera to?

I want to ensure it works with any screen resolution.

You should be moving it up and to the right, so that your lower-left cube is in the lower left corner of the screen.

For now, just throw up some cubes and move the camera manually. Dealing with different screen aspect ratios is a PITA, and will probably require you to dust off your high school algebra. I recommend you ignore that for now and get on with making a game that is fun to play!