Roblox Thread
#5

i know i showed you the screenshots from that "see-through portal" test @cheet and i found a little while ago; here's the link to that: Teleportation portal demo

this also comes attached with a DevForum thread where someone asks how to do this in Scripting Support, and EgoMoose (the creator of this demo) volunteers their experimentation skills.

as that last video demonstrates, a lot of this is magic related to ViewportFrames! a ViewportFrame is a GUI element that basically, lets you render 3D objects as a 2D interface element. however, of course, to display a 3D object it needs a "POV" of sorts, so ViewportFrames also let you control the camera within the frame.

by the way, Roblox gives you multiple possible places to render a GUI. one, of course, would be the player's screen, using a ScreenGui. but there's also a SurfaceGui, which allows you to put 2D interface elements (buttons, textboxes, labels, and of course, ViewportFrames) directly on the face of an object

combine this, and then you do a little wizardry with camera offsets, (fun fact: the player's camera is an object in 3D space too, and its position and rotation can be obtained at any time) and you can make it look like the player is looking through a portal

this trick is slightly unusual though because you don't often put entire environments in a VF; you usually only put individual objects in. for a more common use of ViewportFrames you see in games, the game Tower Heroes has an enemy bestiary that displays 3D previews of its enemies

[Image: ViewportFrame.png]
Reply


Messages In This Thread
Roblox Thread - by huckleton - 09-09-2023, 03:45 AM
RE: Roblox Thread - by brilokuloj - 09-13-2023, 05:23 AM
RE: Roblox Thread - by brilokuloj - 11-13-2023, 05:11 AM
RE: Roblox Thread - by starsystemerror - 11-13-2023, 05:13 AM
RE: Roblox Thread - by huckleton - 11-13-2023, 05:28 AM
RE: Roblox Thread - by brilokuloj - 11-14-2023, 04:15 AM
RE: Roblox Thread - by huckleton - 02-26-2024, 04:19 PM
RE: Roblox Thread - by starsystemerror - 02-27-2024, 04:34 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)