-
What do you want to achieve?
Hello, so i want like a camera shaking system, a value that when it’s higher the shaking is more intense. (The shaking need to be smooth) -
What is the issue?
I don’t know how to make it. -
What solutions have you tried so far?
I looked everywhere and i didn’t find anything.
1 Like
Yes i used that by the past but i stopped because you need to make events to shake.
You can achieved this like this:
local runService = (game:GetService("RunService"));
local camera = (workspace.CurrentCamera);
local AMPLITUDE = (0.25);
local FREQUENCY = (10);
function RenderStep(dt)
camera.CFrame = camera.CFrame * CFrame.Angles(math.cos(tick() * FREQUENCY) * math.rad(AMPLITUDE), math.sin(tick() * FREQUENCY) * math.rad(AMPLITUDE), 0)
end;
runService.RenderStepped:Connect(RenderStep)
Tested it and it was perfect.