#the viewportframe is rotating more then the camera

1 messages · Page 1 of 1 (latest)

inner delta
#

code: ```lua local cam = Instance.new("Camera")
cam.Parent = script.Parent.ViewportFrame

local initialX = 0.045 -- The accuracy is between +- 0.004
local initialY = 0.0174 -- The accuracy is between +- 0.0002

local FOV = 90
local Distance = 15000 -- Distance between object and camera on Z axis

local newX = initialX * (FOV * Distance)
local newY = initialY * (FOV * Distance)
newX += newX * 0.87
newY += newY * 0.87

local run_serv=game:GetService("RunService")

run_serv.RenderStepped:Connect(function()

if workspace:FindFirstChild("SKYHOLDER") then
    
    script.Parent.ViewportFrame.Size = UDim2.new(newX,0,newY,0)
    
    script.Parent.Adornee = workspace.SKYHOLDER:WaitForChild("SKY")
    cam.CFrame = workspace.CurrentCamera.CFrame
    
    

    
    script.Parent.ViewportFrame.HOLD["Fake Skybox"].CFrame = cam.CFrame
    script.Parent.ViewportFrame.HOLD["Fake Skybox"].Rotation = Vector3.new(0,0,0)
    
    script.Parent.ViewportFrame.cloudPart.Position = script.Parent.ViewportFrame.HOLD["Fake Skybox"].Position+Vector3.new(0,15,0)
    script.Parent.ViewportFrame.cloudPart.Rotation = Vector3.new(0,0,0)
    
    workspace.SKYHOLDER:WaitForChild("SKY").CFrame = cam.CFrame * CFrame.new(0, 0, -Distance) -- Assuming you are setting object CFrame Manually
    script.Parent.ViewportFrame.CurrentCamera = cam
end

end)```

twin lark
#

set the FallenPartsDestroyHeight to 0/0 (completely disables the void)