Universal Script 📌
852 Views
33 Executions

Orthographic style camera

Universal Script 📌
d0ntt0uchm7p1zz4
d0ntt0uchm7p1zz4First script
1 year ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No 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)

View Raw
--// 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

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Script hub
4.1M
558.4k
Bumped 14 minutes ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.4k
28.8k
Bumped 1 hour ago
Key System
Script hub
14.0k
28.4k
Bumped 2 hours ago
Universal Script 📌
339.0k
74.9k
Bumped 2 hours ago
Script hub
462.0k
989.7k
Bumped 3 hours ago
Key System

Script hub

Hall of Fame #5

Verified script badgeRonix Hub | 52 Supported Games + OP!

Universal Script 📌
70
6
Approved 3 hours ago