Here is a link to see the game so far: Placement System [Uncopylocked] - Roblox
It is going to be a sandbox tycoon, like welcome to bloxburg. I am working on the camera system that will behave a lot like Roblox Studio. I have got everything working except the system where the camera’s view would rotate when the mouse button 2 is held down and the mouse moves.This is my attempt at it so far, and it is horrible.
UIS.InputChanged:connect(function(inputObject)
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
if EditCam then
if Editing then
if PlotRegion3 then
if Button2Down then
UIS.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
pcall(function()
if inputObject.Delta.X < OldMousePos.X then
Cam.CFrame = Cam.CFrame*CFrame.Angles(0, 0.05, 0)
else
Cam.CFrame = Cam.CFrame*CFrame.Angles(0, -0.05, 0)
end
end)
OldMousePos = Vector2.new(inputObject.Delta.x, inputObject.Delta.Y)
else
UIS.MouseBehavior = Enum.MouseBehavior.Default
end
end
end
end
end
end)
You would notice on there that the camera only moves along the Y-axis. This is just so I can test it easier. Does anyone know a better way to do this?