Re-Creating a Portal Effect,

I’ve also started a project where the two portals are different sizes, and this also causes an issue. It makes the image enlarge the further you move back and messes up on the teleportation. Any workarounds for this?

Is there a way I can make it so that the portals are just sitting in one spot and I don’t click to move them? I just want to use them as a cool way to go from one level to another.

2 Likes

the way i did this was not great, but i actually just made the two portals the same size (the bigger one). My portals used a frame that was inset into the wall anyway, which hides the edges, but you can also use the 0.99 transparency glass trick to hide the sides of the “smaller” portal as the sides of the viewportframe will be hidden.

2 Likes


hi, the portal appears kinda pixelated when u look at it like this, is there a fix?

EDIT:


and also this i guess… this person’s hat appears as a cube

1 Like

There’s no fix to the pixelation issue, it’s just how roblox handles their viewport frames.

2 Likes

Is it possible to make it so Players can go through portals on roofs and floors?

1 Like

Thinking about a way to do that. Maybe duplicating objects and using reversed velocity unless if the portal entrances/exits are facing opposite directions?

1 Like

How do you do it so specific lighting can bee seen through the portal? What I mean let’s say it’s night time for you, but through the portal it’s daylight, how will I do this?

Was there ever a patch for the issue where Parts behind any of the portals would cause a weird over-lay?

Tried everything & can’t seem to patch it. :confused:

You’d have to synthesise time of day using the lighting settings of the viewport frame. A rough example is to set the light colour to black at >6 clock time and white at <7 clock time, lerping the colour for values between 6 and 7 to emulate sun rising, and you would repeat this with appropriate values for sunsetting.

Lighting direction can be determined from Lighting:GetSunDirection() which returns a unit vector from origin 0,0,0 to the point in the sky the sun is located, which can be used to hint time of day at the times sunrise through to sundown.

You’d have to experiment to find something appropriate for whatever you are making, this is just a rough proof - of - concept i suppose.

1 Like

Hey @EgoMoose, was wondering if theres a way to add more than just 2 portals. Been trying but no luck so far. Is there any method I could use?

@EgoMoose @DrAdministration

Is there a way using the current Portal system that we can adjust the Size of the Portals without impacting the ViewportFrame of another; Currently it seems that both Portals need to be the equal sizes of each-other to avoid camera warping & so forth.

I’m looking for a way to avoid having them needing to be the same size.

Thank you!

or they just used UiCorner to round

i don’t know if this will help but i wrote a function for that:
function SurfSizechec(surfacesize)
if surfacesize.Y > surfacesize.X then
surfacesize = Vector2.new(surfacesize.Y,surfacesize.Y)
elseif surfacesize.Y < surfacesize.X then
surfacesize = Vector2.new(surfacesize.X,surfacesize.X)
end
return surfacesize
end
then in the viewportwindow:Render() make that SurfaceSize = SurfSizechec(SurfaceSize)

try just cloning parts that the portal can see

Hello, The portal don’t teleport object, is this normal?

1 Like

How would I make objects/parts able to travel through the portal?


I found this post yesterday and I’ve been playing a bit with the EgoMoose portal, my code is quite rudimentary and has several errors, the main one in my opinion is that the portals don’t work if both are on the same part. Despite this, the result is quite good.

13 Likes

1: check if your object(or model) can be teleported
2: check if the object position is in the portal
3: if it is, then teleport it

1 part: you can use dot product
2 part: it is Impossible to show the other portals view in a viewport frame