
845 Views
31 Executions
Orthographic style camera
Universal Script 📌
d0ntt0uchm7p1zz4First script
1 year ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Project zomboid style camera, just makes the camera really far away and from a top down view. (Yet again this is me stress testing my coding LLM before releasing it)
--// Fixed Orthographic Camera Script
--// Run in a LocalScript or in the Client console
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.FieldOfView = 70 -- ignored in Orthographic mode, but kept for fallback
-- Convert degrees to radians
local yAngle = math.rad(45) -- yaw
local xAngle = math.rad(-30) -- pitch (negative looks downward)
-- Set orthographic mode
camera.ProjectionMode = Enum.ProjectionMode.Orthographic
camera.Orthographic = true -- (some clients require explicit call in older versions)
-- Optional: camera distance from focus point
local distance = 30
-- Focus target (character if exists, otherwise workspace origin)
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
-- Update camera position every frame
game:GetService("RunService").RenderStepped:Connect(function()
local focus = root.Position
local rotation = CFrame.Angles(0, yAngle, 0) * CFrame.Angles(xAngle, 0, 0)
local offset = rotation.LookVector * -distance
camera.CFrame = CFrame.new(focus + offset, focus)
end)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







