How to make 2D camera offset by mouse's screen position?

Camera.CoordinateFrame = (CFrame.new(Character.Head.Position.X, Character.Head.Position.Y, Character.Head.Position.Z-Zoom) * CFrame.Angles(0, math.rad(180), 0))

This is the code I have for my 2D camera, and I’m trying to make the camera get a bit of offset based off of the mouses screen position, so you can look further in one direction, kind of like how Noita does it.

You could use CoordinateFrame… or camera offset…
but I suggest settings up a renderstepped loop that cframes the camera.

Example:

RS.RenderStepped:Connect(function()
Camera.CFrame = Camera.CFrame:ToWorldSpace(Cframe.new(math.sin(tick()), 0, 0))
end)

I figured it out
https://i.gyazo.com/45f67a4ddcf44cf6608b5e7d5b1c273e.mp4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.