#i feel like im dying

1 messages · Page 1 of 1 (latest)

naive gale
#

i dont want like a direct coding answer for this cuz i wanna leanr but HOLY CRAP WHY DOESNT THIS WORK PROPERLY
basically im trying to make the portals from the valve game portal/portal 2
but when i try to make the portal rotate along the players view it just, starts doing drugs? idk how to explain it
(video of issue below)

#

i just realized it doesnt embed

#

oh it has higher file size here

#

nice

rotund coral
rotund coral
# naive gale

i think it is probably something with the camera Cframe part but i dont really get what is happening either

somber patioBOT
#

studio** You are now Level 3! **studio

full schooner
surreal scarab
torn rapids
surreal scarab
# naive gale

if you want to achieve portal like portals you need to change "camera" direction of viewport frame

#

i think there're many tutorials with similar effect

rose thorn
#

lemme try to code that rq

naive gale
#

i guess i can paste it here

#

but

#

here

#

local camera = Instance.new("Camera")
local plrcamera = workspace.CurrentCamera
local bluePortal = script.Parent.Parent.Parent.BluePortal.Value
local orangePortal = script.Parent.Parent.Parent.OrangePortal.Value

local hrp:Part = game.Players.LocalPlayer.Character.HumanoidRootPart

script.Parent.CurrentCamera = camera
camera.FieldOfView = 70

while task.wait() do
local lookat = CFrame.lookAt(hrp.Position, orangePortal.Position)
camera.CFrame = orangePortal.CFrame * lookat.Rotation * CFrame.Angles(0, math.rad(90), 0)

for i,v in script.Parent:GetDescendants() do
    if v:IsA("Script") or v:IsA("LocalScript") then continue else v:Destroy() end
end

for i,v in workspace:GetDescendants() do
    if v:IsA("Terrain") then continue end
    if v:IsA("Part") then
        if v ~= script.Parent.Parent.Adornee then v:Clone().Parent = script.Parent end
    end
end

end

rose thorn
#

how are u struggling with this

#

coded it in like 5 seconds

#

well its pretty shit

#

bc idk how to do all of the uv stuff

#

lemme show

#

@naive gale

naive gale
#

what

rose thorn
#

wait

#

i didnt do it correctly

#

lemme fix

naive gale
#

i just started messing with cframes ;-;

#

i feel stupid now

naive gale
#

I GOT IT

somber patioBOT
#

studio** You are now Level 7! **studio

naive gale
#

idc about level rn but thanks