Hey! I’m trying to make a recoil system for my gun system (both FPS and OTS)
First person works flawlessly; but the OTS one feels a bit off.
https://i.gyazo.com/2d4d90a3c375a343db2434acd1d1e334.mp4
I’ve tried a ton of things; my current code is
lookat = CFrame.new(newCameraCFrame.p,(newCameraCFrame * CFrame.Angles(extra.X,extra.Y,0) * CFrame.new(0,0,-1)).p)
newCameraCFrame = lookat
Extra is the recoil, NewCameraCFrame is the CFrame the OTS module forms every frame and I edit it to include recoil.
The issue is that it seems to be doing the recoil relative to the camera and not the character, which causes it to look like this.
I tried making it relative to the HumanoidRootPart but it made it so that the camera’s view became skewed which was even worse than this.
Does anyone have any idea what I could do to fix this?
Thanks!