Hi, I would like to know what method I can use to achieve an effect where, picture this, there’s an house, and in the lobby screen the camera just goes in a 360 orientation around the house constantly just viewing and facing the house,
how can I achieve this camera manipulation effect ?
Oh I’m not trying to rotate model, I’m trying to 360 view a players camera like in one of those lobbies, check the video I sent in this forum post please,
Thanks for reply though
I made this quick simple script that will rotate the camera in a circle around a specific target part. You can customize the variables at the top to your liking, and expand the script to your own needs. For the purposes of an example, the script rotates the camera for only 5 seconds and then disables it, but you can change this. This should be a LocalScript inside StarterPlayerScripts:
--customize the variables directly below
local targetPart = workspace:WaitForChild("Target") --target part to rotate around
local speed = 0.25 --full rotations per second around target
local distance = 50 --stud offset distance from target
local height = 25 --stud offset height from target
local currentAngle = 0
local tau = math.pi*2
local function UpdateCamera(dt)
local cam = workspace.CurrentCamera
if cam.CameraType ~= Enum.CameraType.Scriptable then
cam.CameraType = Enum.CameraType.Scriptable
end
currentAngle += speed * tau * dt
local offset = Vector3.new(distance * math.sin(currentAngle), height, distance * math.cos(currentAngle))
cam.CFrame = CFrame.lookAt(targetPart.Position + offset, targetPart.Position)
cam.Focus = targetPart.CFrame
end
local function EnableLobbyCamera()
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
game:GetService("RunService"):BindToRenderStep("LobbyCamera", Enum.RenderPriority.Camera.Value-1, UpdateCamera)
end
local function DisableLobbyCamera()
local cam = workspace.CurrentCamera
game:GetService("RunService"):UnbindFromRenderStep("LobbyCamera")
cam.CameraType = Enum.CameraType.Custom
end
local player = game:GetService("Players").LocalPlayer
if not player.Character then
player.CharacterAdded:Wait()
end
EnableLobbyCamera()
task.wait(10)
DisableLobbyCamera()