Gun System Camera Effects

Hey so im currently working on my own gun system, does anyone know how to achieve the camera shake in the video below?

https://gyazo.com/904d34c9b4da9efd705b9ef594f043d2

7 Likes

You could adjust the x and y axis of the CurrentCamera CFrame and FOV if needed

1 Like

yeah but im not sure how to do that

I found a forum post that might help: EZ Camera Shake ported to Roblox

1 Like

thats what i was using at first but i didnt understand it; how do i customize the code?

local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75)
c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15)
c.RotationInfluence = Vector3.new(1, 1, 1)
1 Like

Is this the full code you’re using?

1 Like

no, thats the preset in the module, you can make your own and customize it

1 Like

I’m not on my PC rn so I can’t look into it. Might write a code that you could use later.

1 Like

that would help alot! thanks a bunch

1 Like

anyone else got some ideas? been trying for the last 3 hours

1 Like

Sorry didn’t have time today, gonna do it tomorrow. I’ll bookmark me the post

1 Like

alright! thanks if you can that would really help me out

1 Like

anyone got any updates today? would be helpful

I might need to do it tomorrow :confused: I have to study for an exam. So u might need to wait for tomorrow.

alright thank you! good luck with your exam

yo, i can help u customising the thingy

  1. CameraShakeInstance.new(2.5, 4, 0.1, 0.75): This line creates a new CameraShakeInstance object with the following parameters:
  • 2.5: The duration of the camera shake in seconds.
  • 4: The magnitude of the camera shake.
  • 0.1: The frequency (how rapidly the camera shakes).
  • 0.75: The roughness (how erratic or smooth the shake is).You can customize these values to change the duration, magnitude, frequency, and roughness of the camera shake. For example, if you want a longer and stronger shake, you can increase the duration and magnitude values.
  1. c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15): This line sets the position influence of the camera shake. It determines how much the camera’s position will be affected along the X, Y, and Z axes. You can customize these values to control the direction and extent of position shaking. In this case, the camera will shake mostly in a diagonal direction.
  2. c.RotationInfluence = Vector3.new(1, 1, 1): This line sets the rotation influence of the camera shake. It determines how much the camera’s rotation will be affected along the X, Y, and Z axes. You can customize these values to control the direction and extent of rotation shaking. In this case, the camera will rotate in a more uniform manner along all axes.

To customize the code for your specific needs, you can adjust the parameters mentioned above to achieve the desired camera shake effect. Experiment with different values for duration, magnitude, frequency, roughness, position influence, and rotation influence until you achieve the effect you want in your game or application.

it was actually (magnitude, roughness, fadeInTime, fadeOutTime) but thank you!

1 Like

Glad that someone helped you :slight_smile:

1 Like

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