CameraUtil - Your new tool for simple camera manipulation! (OPEN-SOURCED)

Awesome! Thanks so much!

Have fun with your first year, I really enjoyed mine.

2 Likes

Thanks very much, Iā€™m just now digging into this and so far it looks really sweet. I also wanted to say good luck in your time at college. Prioritize the work first, and plenty of good times will happen on their own. Thanks again!

1 Like

Is there a way to keep the camera shake after respawning?
I tried this and the camera shake didnā€™t work after respawning and in the output said, ā€œattempt to call nil valueā€. Could be really useful in many cases.

@SodaCanBros Thank you for your kind words! Iā€™m very much excited for my first year :slight_smile:

@RocketPig3527 Hey, Iā€™d be glad to help you with this. This could be because the camera shake module is programmed in a way to stop shaking on player respawn (Iā€™ll look into this). Meanwhile, where is your local script placed? And could you send me your code, and where the error is? That would be very helpful thank you :slight_smile:

Ok, my local script is in the StarterCharacterScripts file and hereā€™s a screenshot of the code.


The reason why thereā€™s duplicates of the same variables was because I was attempting to fix it.
Unfortunately, I canā€™t find a way to locate where the error is happening. I checked the local script, but was unable to locate the cause of the error. Also adding to complications, the output only reads this:
error2
Really wish I could send more info on this, but so far, this is all I got.
Hope you find the cause soon!

How can I use this for a build mode camera?

Possibly have the camera facing the middle of the plot or place youā€™re trying to build on from the top using the Y-Axis. Then when a player is out of build mode, reset the camera.

Great resource, itā€™s been a great help and time saver. Just curious though, the orbit function seems to stop mid orbit instead of constantly continuing. I was wondering if this was intentional because Iā€™m wanting it to orbit until I call it to reset or disconnect

1 Like

Curious if this is still possibly being updated? I can understand if life has prevented work on it, goodness knows it does that too me, though by chance would this work in a FPS sense?

1 Like

milk man dani

Thank you Awesome3_Eric, very cool.

1 Like

please tell me does this include bezier curves

Yes, CutsceneService which is used for the cutscenes here utilizes BĆ©zier curves.
Unfortunately, a relatively old version is used here because it hasnā€™t been updated, so I would recommend to use CutsceneService directly to have the newest version.

Iā€™m so sorry, Iā€™ve been so busy with college, I do plan on updating this CameraUtil to accompany your newly published module + more methods to use :slight_smile:

1 Like

Wow! Great coincidence that I found this. I was just about to put CutsceneService and CameraShaker together to create my start screen :smiley:

ayo lad, how do i fix this? Iā€™m currently trying this out and I encounter this.

RunService:fireRenderStepEarlyFunctions unexpected error while invoking callback: ReplicatedStorage.CameraUtil:426: attempt to index nil with 'CFrame' - Studio
15:14:09.031 ReplicatedStorage.CameraUtil:426: attempt to index nil with 'CFrame' - Client - CameraUtil:426

What I did:

--[[\\\ CAMERA ///]]--
task.wait(1)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CameraUtil = require(ReplicatedStorage.CameraUtil)
local functions = CameraUtil.Functions
local shakePresets = CameraUtil.ShakePresets

local cameraInstance = workspace.CurrentCamera
local camera = CameraUtil.Init(cameraInstance)

--[[
	-- FUNCTIONS --
	DisableControls
	StartFromCurrentCamera 
	EndWithCurrentCamera
	EndWithDefaultCamera
	YieldAfterCutscene
	FreezeCharacter
	CustomCamera
	
	-- SHAKE PRESETS --
	Bump
	Explosion
	Earthquake
	BadTrip
	HandheldCamera
	Vibration
	RoughDriving
]]--

local Shake = CameraUtil:CreateShake()
Shake:Shake(shakePresets.Explosion)
Shake:ShakeOnce(5,10,2,1,Clone1.WorldPosition)
Shake:Start()

im very new to this, i may have done some problems

Great module but i am having issues once i have focused the playerd camera on a part gettig the camera back to the same position/angle on the player.

Thanks

I have an issue when using the :Cutscene function, It seems that the playerā€™s chat is disabled, though I am not using ā€˜DisableControlsā€™ functions. I am using the following;

	if Arg == "Cutscene" then
		camera:MoveTo(tbl.Centre)		
		cutscene = camera:CreateCutscene(
			tbl.Base,
			tbl.Duration,
			tbl.E1,
			tbl.E2,
			functions.StartFromCurrentCamera,
			functions.EndWithCurrentCamera
		)
		cutscene:Play()
	end