Shift a scene down

Go easy if I’m doing this wrong, I haven’t written games before. I want to figure out how to shift a scene down so an object I create at (0,0) is created at (0,100) on the parent’s grid. Here is the context:

My game has touch controls for mobile use that I’d like to hide when running on desktop. I’ve found this.sys.game.device.input.touch which is perfect for figuring out whether to show or hide the controls.

My question is about what to do with the empty space. The controls are at the bottom and I’m inclined just to shift the rest of the scene down a bit, leaving black bars at the top and bottom. (My game works best if the scene dimensions remain the same on all devices.)

I haven’t figured out how to shift the scene down easily. Of course I can offset the y values of all the objects I create in the scene. But can I just shift it down so (0,0) is actually something like (0,100) in the parent’s grid?

Thanks!

It sounds like you may want to do

this.cameras.main.scrollY = -100;
1 Like