Render camera in world

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Fadenfire
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jan 18, 2022 9:40 pm

Render camera in world

Post by Fadenfire »

I am trying to create a mod that adds portals and I wanted to try to make it so that you can see through the portal to the other side. My first idea was to add a camera GUI element to player.gui.screen and constantly move it to the location of the portal on the screen. Unfortunately this has many problems like the camera always being on top of other GUI elements and no way to scale the camera with zoom.

What I would like is a way to create a custom camera in the world using the lua rendering API (or something like it). An alternative is some way to draw GUI elements in world, which could probably be used for a lot of other things as well.

Here is an example of the effect I want to achieve:
Screen Shot 2022-01-18 at 4.50.53 PM.png
Screen Shot 2022-01-18 at 4.50.53 PM.png (557.26 KiB) Viewed 515 times

Post Reply

Return to “Modding interface requests”