Creating weapon sway when the camera is moved

For reference, this is what im trying to recreate (please watch):

So far I’ve used the mouse delta of the camera of the camera to create something like it:

loadout.current.anims.swingcam = CFrame.Angles(-math.rad(camscope.DeltaY/5), -math.rad(camscope.DeltaX/5), 0)

The delta is basically multiplied by 0.07, as it is multiplied by 0.35 first, however I plan to make it available for users to be able to change the mouse movement multiplier setting in the future.

This is what it does so far:

Of course the movement isn’t fluid as it links directly to the movement of the mouse per movement so it kind of jerks a bit, and when its moved too much it looks completely horrible.

I think that it should be limited in terms of movement and probably be lerped to make the movement more fluid however I’m not sure how I would implement this properly.

I think something like this:

image

5 Likes

The videos are unavailable. They won’t show.

3 Likes

Oh my mistake, I listed the as private, thanks for notifying me.

3 Likes