CameraService: A New Camera for a New Roblox

I do not want to know how long this took to make.

Jokes aside, this looks great, and I definitely will use it in the future! Good job on it!

2 Likes

I haven’t even dropped it in game to test it yet and I can already tell you this will be 10x more useful then the current toolset given to us, just the camera shake and smoothing options alone makes this worth the +rep.

2 Likes

In love with this. The idea of a cinematic camera just gave me a ton of inspirations in order to implement a more immersive cutscenes in my games.

Amazing resource!

2 Likes

Absolutely amazing resource!

It’s a steal that it is open-sourced and will add so much value to cut-scenes in the future! Thanks for this.

3 Likes

Thanks for the fix! This new 2D update looks great. I have a suggestion though, is it possible make it like when you are watching from the cliff in the demo game, your camera is locked to your character, like in detroit become human.

2 Likes

This is amazing, and will make manipulating camera easier!! Thank you :slight_smile:
I’m trying to implement this service in my game now i working on, and I have a question…

I have normal camera that Player can manipulate in game.
Like I already have some scripts to manipulate camera as shift lock cam, and sometimes It create Camera CFrame tween animation.
and I want to run your camera service to specific situation.

For instance, Here’s a GUI button that will make game as cinematic mode for local player.
Normally I use this script.

-- Camera View Change Information
local information = {
	Smoothness = 5,
	CharacterVisibility = "All",
	Zoom = 10,
	AlignChar = true,
	LockMouse = false,
	BodyFollow = false
}

btn.MouseButton1Click:Connect(function()
	if btn.BackgroundColor3 == Color3.fromRGB(255, 255, 255) then --when it's not cinematic mode
		CameraService:CreateNewCameraView("Cinematic", information) -- make game cinematic
		btn.BackgroundColor3 = Color3.fromRGB(255, 28, 130) -- change button background color
	else 
		CameraService:SetCameraView(destroy) -- HOW CAN I DESTROY OR STOP THIS SERVICE?
		btn.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- change button background color
		end
end)

Well… I want to know HOW CAN I DESTROY OR STOP THIS CAM SERVICE? or how can make camera view back to before?

Thank you for this amazing work! Let me know if you have some thought about my question :slight_smile:

2 Likes

Hey!
What you can do is set the camera view to “Default” when wanting to halt CameraService. It should reset you back to original Roblox camera. From there, you should be able to manipulate the camera however you need to on your own!

2 Likes

hey so i actually noticed something: this does not work with FPS unlockers, i tested this in 2 ways.
when testing with a Camera Bobbing script that WORKS with fps unlockers and CameraService isnt being used, the script works fine with all FPS. however, if the script is being used and CameraService is also being used, the CameraBobbing script now doesnt not work with all FPS.

basically: when using camera service, the higher fps the higher sensitivity and vise versa
@Lugical

1 Like

When I have the time, I’ll look into it. I currently am prioritizing other personal projects and things at the moment, so it’ll take some time and patience for that.

2 Likes

This is just what I needed, you really did an awesome job with the presets, thank you for sharing such a high quality resource, take ur 100th like, you deserve more!

1 Like

Hello, I cant move my camera while im in first person. do you know why?

1 Like

Any output errors? It works fine for me.

1 Like

No errors

and also another issue, is the mouse supposed to stay in the center in ShiftLock mode? (also camera doesnt move in shiftlock mode either)

camera only moves in thirdpersonmode for me

1 Like

Can you send over the code you used to implement the system?

1 Like

Nice service it is tremendously useful!, but you should have an option when the shift-lock is enabled to have the character look parallel to where the mouse is like the original shif-lock and look pointed at the mouse.

1 Like
local CameraModule = require(game.ReplicatedStorage.CameraService)

CameraModule:SetCameraView("ThirdPerson")

This is my main handler script in StarterGui.

Also in the main handler:

local cameraView = 1
game:GetService("UserInputService").InputBegan:Connect(function(a,p)
	if not p  then
		if a.KeyCode == Enum.KeyCode.C then
			if CameraView == 1 then
				CameraModule:SetCameraView("FirstPerson")
				CameraView = 2

			else
				CameraModule:SetCameraView("ThirdPerson")
				CameraView = 1

			end
		end
	end
end)

In a script thats in StarterCharacterScripts, I have just one line doing:

camMod:SetCameraView("ShiftLock")

Both firstperson and shiftlock, when enabled, doesn’t allow camera movement.

Your cameraView variable isn’t matching with the first C. That might be the reason why FirstPerson isn’t working, because it’s not triggering.

Since you’re setting both of these camera views at runtime once, I’m assuming that ThirdPerson simply just overrides and is the camera view you’re seeing. That could be the root of the unexpected behavior.

By any chance, are you using any other camera modules that might interfere with CameraService?

1 Like

That’s weird. The camera did change though from first person to third person, and vice versa. It’s just that in the first person the camera doesn’t move.

I don’t believe that there is another camera module, however, I will take a look.

Is there possibly a way to print the current camera view?

1 Like

I’ve isolated the issue. So turns out it’s my viewportframe scripts causing it. I’m not entirely sure why atm.

1 Like

The viewport frames seem to only break your camera system. It works with the normal camera.

EDIT: Same issue happens with another camera modules shiftlock system. Works with Roblox’s though. Not sure why viewport frame breaks custom ones.

ANOTHER EDIT: It seems to be because the CameraType is Scriptable? It has to be scriptable though so I’m not sure why.

EXPERIMENTATION: It seems the in the CameraService module code, Input.Delta for the onInputChange function is always 0,0,0 while in first person. (Input Object Delta Returning 0 Every Time - #7 by snorebear) possibly a mousebehavior issue?

Going back to the first assumption, I do believe this is an issue with viewport frames being in my UI… I’m not really sure why. In first person, before viewportframes are added, the mouse is locked to the center, after viewport frames are added though, the mouse can be moved around and the camera not.