Camera element gui seems to be adding 1 to the passed surfaced_index. Subtracting 1 from the index causes it to show the correct surface.
gui = player.gui.goal.add{
type = "camera",
name = "test_camera",
position = position
surface_index = surface.index
}
The camera will point at surface.index + 1
luaGuiElement::Camera wrong surface_index
Re: luaGuiElement::Camera wrong surface_index
Thanks for the report. Fixed for the next version of 0.15.
If you want to get ahold of me I'm almost always on Discord.