Project Zomboid is a zombie survival game if you don’t already know about it
Anyway, the camera in PZ is sorta like a isometric perspective.
Anyone know how I could do somehting like this?
Project Zomboid is a zombie survival game if you don’t already know about it
Anyway, the camera in PZ is sorta like a isometric perspective.
Anyone know how I could do somehting like this?
Hi!
You need to make a local script that adds camera’s original position, but adds more numbers to the Y position, for instance.
Basic example:
game["Run Service"].RenderStepped:Connect(function(var)
workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(workspace.CurrentCamera.CFrame.X, workspace.CurrentCamera.CFrame.Y + 100, workspace.CurrentCamera.CFrame.Z))
end)
Just make the camera position itself to your wished place, not the Y scale, again, this is a basic example.
Hope this helps!
CameraMaxZoomDistance
and CameraMinZoomDistance
in the properties of StarterPlayer
. I suggest something like 75(min) 75(max) to start with.DevComputerCameraMovementMode
and DevTouchCameraMovementMode
to Orbital
.Local Script
inside StarterPlayerScript
, then copy, paste and edit the following code.local PlayerModule = script.Parent:WaitForChild("PlayerModule")
local OrbitalCamera = PlayerModule and PlayerModule.CameraModule.OrbitalCamera
local UseAzimuthLimits = OrbitalCamera:WaitForChild("UseAzimuthLimits")
local ReferenceAzimuth = OrbitalCamera:WaitForChild("ReferenceAzimuth")
local CCWAzimuthTravel = OrbitalCamera:WaitForChild("CCWAzimuthTravel")
local CWAzimuthTravel = OrbitalCamera:WaitForChild("CWAzimuthTravel")
local InitialDistance = OrbitalCamera:WaitForChild("InitialDistance")
local MaxDistance = OrbitalCamera:WaitForChild("MaxDistance")
local MinDistance = OrbitalCamera:WaitForChild("MinDistance")
local InitialElevation = OrbitalCamera:WaitForChild("InitialElevation")
local MaxElevation = OrbitalCamera:WaitForChild("MaxElevation")
local MinElevation = OrbitalCamera:WaitForChild("MinElevation")
--SETTINGS PRESET--
-- Camera Rotation Left - Right
UseAzimuthLimits.Value = true --Use or not the other Azimuth parameters
ReferenceAzimuth.Value = -45 --How many degree you want the starter camera to be (-45° for isometric view)
CCWAzimuthTravel.Value = 0 --How many degree the camera can travel from its ReferenceAzimuth to the left (0° for a fix camera)
CWAzimuthTravel.Value = 0 --How many degree the camera can travel from its ReferenceAzimuth to the right (0° for a fix camera)
-- Camera Rotation Bottom - Top
InitialElevation.Value = 45 --How many degree you want the camera to be elevated right from the start (when spawning) (45 for isometric view)
MaxElevation.Value = 45 --What would be the maximum elevation for the camera
MinElevation.Value = 45 --What would be the minimum elevation for the camera
-- Camera Distance from the Character
InitialDistance.Value = 75 --At how much distance you want the camera to be from the character right from the start (when spawning)
MaxDistance.Value = 75 --What would be the maximum distance for the camera
MinDistance.Value = 75 --What would be the minimum distance for the camera
Thanks, ChatGPT…
Anyway, to answer the OP’s question…
You can make an isometric view by placing the camera really far out, and making the FOV very small.
It is completely irrelevant, and just because I wrote my answer step by step doesn’t mean it comes from an AI. I wrote it this way because it makes it easier to guide OP on how to create an isometric camera view correctly using the current Roblox-made camera system. Plus, I doubt that ChatGPT knows what the default PlayerModule on Roblox is, as well as the OrbitalCamera module and its associated values.
Are you aware that an isometric view is primarily based on a locked (45° - 45°) camera angle without the possibility of rotation? This won’t help the OP at all.
Thank you! I’ve been playing around with my game for some time and figured it out!
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local isoAngle = math.rad(45)
local elevation = math.rad(30)
local distance = 100
camera.FieldOfView = 20
local function updateCamera()
local character = player.Character
if character and character.PrimaryPart then
local focusPoint = character.PrimaryPart.Position
local offset = Vector3.new(
distance * math.cos(isoAngle) * math.cos(elevation),
distance * math.sin(elevation),
distance * math.sin(isoAngle) * math.cos(elevation)
)
local cameraPosition = focusPoint + offset
camera.CFrame = CFrame.new(cameraPosition, focusPoint)
end
end
RunService.RenderStepped:Connect(function()
updateCamera()
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.