Page 1 of 1

Render camera in world

Posted: Tue Jan 18, 2022 11:19 pm
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 519 times