I tried using this video to try to make a portal, but it’s a lot harder than I thought. I can’t get it right for some reason. He said to move it back through the wall How were the portals in Portal created? | Bitwise - YouTube at 2:42, but I think it just made it worse. At 4:08, he says to crop it down and scale it up, but I have no idea how to do that. My script so far
local guipcf = script.Parent.GUI.CFrame -- the surface gui's adornee
local camer = workspace.camera -- the red block
game:GetService("RunService").Heartbeat:Connect(function(dt)
cam2.CFrame = CFrame.lookAt(Ccam.CFrame.Position,guipcf.Position)
local mag = (Ccam.CFrame.Position-script.Parent.GUI.Position).Magnitude
cam2.CFrame = CFrame.new(camer.Position - cam2.CFrame.LookVector*mag) * CFrame.Angles(cam2.CFrame:ToEulerAnglesXYZ())
--cam2.CFrame = cam2.CFrame - cam2.CFrame.LookVector * mag
--cam2.CFrame = Ccam.CFrame
--cam2.CFrame = CFrame.new(script.Parent.GUI.Position - Ccam.CFrame.LookVector*mag)
--cam2.CFrame = CFrame.lookAt(Ccam.CFrame.Position,script.Parent.GUI.CFrame.Position)
--local cf = CFrame.lookAt(cam2.CFrame.Position,Ccam.CFrame.Position)
--cam2.CFrame = cf * CFrame.Angles(cf.Rotation.X,cf.Rotation.Y+math.rad(180),cf.Rotation.Z)
end)
the 3 things so it maybe doesn’t get removed
- What do you want to achieve? portal camera
- What is the issue? it just aint right
- What solutions have you tried so far? The whole video, and tried looking at the portal tech demo