I'm trying to make Portal-type portals, without the teleporting, just like a window to another area. I've got a viewport as a texture on a plane, but it doesn't change at all when I move around it. I want to see the 3d objects at other angles.
How can I do this?
Portal-like portals?
Would something like this help? It's not exactly portals, but it shows how to view two parts of the same game, with movement.
- Edited
Yes, you would use viewports. But each viewport camera will need to move each frame to match the user's position. So you have to do some math.
I linked to an interesting portal project in this discussion that may be a helpful reference: https://godotforums.org/d/25058-portal-implementation/3. It does not do teleportation though, but that part isn’t too hard, it just requires getting the position of the player relative to the portal (collided-portal.global_transform.xform_inv(player-pos)
, I think) and then making it relative to the other portal (player-node.global_transform.origin = other-portal.global_transform.xform(relative-portal-pos)
I think).