Weapon/Melee Screen Shake

I’ve been trying to figure out how many games such as Weaponry (displayed bellow) makes these sort of screenshake, if anyone has any sort of idea PLS let me know

I tried offsetting the camera towards the magazine/handle a little and didnt achieve what I really looked for.. I presume it uses CFrames

(i’m not looking for a code to copy paste :sob:)

1 Like

EZ Camera Shake, once a legend, always a legend

1 Like

what part of the module does it use?

Just use something like this(from the post):

local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCf)
	camera.CFrame = camera.CFrame * shakeCf
end)

camShake:Start()

-- Explosion shake:
camShake:Shake(CameraShaker.Presets.Explosion)

Just check the documentation for different modes, and get the needed modules from the post(just assume you need them all)

Its a like set Camera Shake so its not different every time

unsure if they made it using a part or blender to animate the camera?

How you did like this can you share source?

This is a port from Unity, and it’s been around for a long time, done many ways.
Here is my version of it, revamped a bit. This is a setup file with all you need.
There is a test file in this too. No explanation needed. Drag-and-drop setup.
Shaker.rbxm (8.2 KB)

Some other links
andersonaddo/EZ-Camera-Shake-Unity
Sleitnick/RbxCameraShaker

My version it pretty easy to use.. fire a remote and you shake.
Was doing this back in Unity the same way. Good stuff.

1 Like

As a heads-up, I got it to work by adding a part (CameraBone for example) to my character then making the camera’s CFrame be affected relative to the difference in orientation between the character’s Torso and CameraBone.

Here’s how it looks:

image

local cameraBone = char:WaitForChild('CameraBone')

local m6dCamera = Instance.new('Motor6D')
m6dCamera.Parent = torso
m6dCamera.Part0 = torso
m6dCamera.Part1 = cameraBone
m6dCamera.Name = 'CamBone'
m6dCamera.C0 = CFrame.new(0, 2, 0)

local OldCamCF = cameraBone.CFrame:ToObjectSpace(hrp.CFrame)

local function updateCam()
	local NewCamCF = cameraBone.CFrame:ToObjectSpace(torso.CFrame)
	local updatedCF = NewCamCF:ToObjectSpace(OldCamCF)

	cam.CFrame *= updatedCF
	OldCamCF = NewCamCF
end

runService.RenderStepped:Connect(function(delta)
	if hum.Health > 0 and char:FindFirstChild("Torso") then
		updateCam()
	end
end)

Then, you can add a rig and do the same setup as your character (adding a CameraBone) then animate the orientation

Here’s a little showcase;


*Sorry for the extremely bad quality :sob: here’s a video link if you want to see it more clearly: https://www.youtube.com/watch?v=WavGdq71GNs

1 Like