Object gate like in Ready Player Two Hub

I’m trying to make a gate like the gates in the Ready Player Two Hub, here are the gates:
ReadyPlayerTwoGate3.PNG ReadyPlayerTwoGate2.PNG ReadyPlayerTwoGate.PNG

Here is my attempt:
Gate3.PNG Gate2.PNG Gate1.PNG

My attempt in relation to the model in the gui:
Gate5 Gate4.PNG

I know I need to make a SurfaceGui with the adornee set to the portal part, and to put a part behind a portal, then copy it to a Viewportframe. The problem is, Ready Player Two Hub has a camera for each “gate”. I just set the camera to CurrentCamera. If I make a seperate camera, what should I make the camera do? Change its position? According to what? I really would like some help with this, and would be grateful to anyone who comes up with a solution. I’m aware there were simillar topics before, and I tried using them with no success. For example, there was the Re-Creating a Portal Effect, and the Teleportaion Portal Demo.

6 Likes

I’m not too sure what you want, so if possible, could you provide us with some videos?

It is most certainly possible, as I showed the example from the Ready Player Two Hub, which is what I’m aiming to do.

so what exactly is supposed to happen?

I showed exactly what I want to do and I don’t think I should explain again. Please try reading the entire post.

He did explain though.

I’m not sure if I’m right, but I’m pretty sure what MagicQuartz is trying to do is recreate the portals in the Ready Player Two Hub. I’m not too good at scripting so that’s pretty much all I can say…

That’s exactly what I’m trying to do. Thank you so much for clarifying that, and sorry for not being understandable enough.

@MagicQuartz Try using this

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local HumanoidRootPart = char:FindFirstChild("HumanoidRootPart")
HumanoidRootPart.CFrame = CFrame.new(partname)

I hope this works and if this is what you are trying to do, it should work! gl with your project!

So, I read through the whole post carefully and you’re saying that your problem is that you want a separate camera for each viewport frame. Well, I’ll try going into detail on how I would do this. Disclaimer: I do NOT have access to studio currently so I can’t test this solution out. Basically, you want to insert a camera object inside the viewport frame. Then what you want to do is put a script inside the camera object. The script will contain this code:

--- Script parented to the camera

-- Let's first define a variable
local Model = YourModel 

-- Next let's make this camera face the model.

script.Parent.CFrame = CFrame.new(Model.Position + Vector3.new(5,0,0), Model.Position) -- Sets the camera 5 studs away from the model on the X axis and makes the camera look at the model.

Ok, this code I’ve shown works like this. First, you insert a camera into the viewport frame. Second, you insert a script into the camera and put this code. Next, you define the “Model” variable to your model in the viewport frame, and then, you test this code.

Thanks so much for the help. I’ll try it tomorrow.

1 Like

Thanks I really appreciate it. I’ll try it tomorrow.

1 Like

@MagicQuartz Are you trying to make it teleport a player?

No, I know how to make the teleportation, I just need the object in the gate/portal to match the player’s view.

Oh, could you send me a video in private msgs of that so I can try to help.

I’ll send it later, and thank you, I appreciate your help.

So, I read the script (and tried it). My goal ismaking the viewport frame look like it has depth, not setting the camera to a CFrame in a certain distance, because then it would just look like an image of the object, and when you change your own camera’s position, it wouldn’t adapt.

What do you mean?
What do I need to flag?

that was a post referring you to the portal effect post I didn’t see you had already used it above at first

So what happened? I don’t understand…

Mess around with how far the camera is from the object. Other than that, I can’t help much. Try making the camera a few studs farther. Also please send pictures of the portal.

1 Like