Method to move a simulation's camera to another surface

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat May 08, 2021 2:36 am
Contact:

Method to move a simulation's camera to another surface

Post by Wiwiweb »

When making menu simulations, you can move the camera using this:

Code: Select all

game.camera_position = {x, y}
game.camera_zoom = 1
I would like to also add a method that chooses the surface that the camera is looking at. Something like:

Code: Select all

game.camera_surface = game.surfaces["spaceship-surface-1"]
This is for creating menu simulations for Space Exploration.

Thanks!

Post Reply

Return to “Modding interface requests”