The current sway in my game is good and all, but the sway can get in the way while aiming. I believe that simply disabling the sway while aiming isn’t a good enough solution, and I’ve seen multiple games do the same thing that I want to achieve.
Current sway:
Basically I need the sway to still be moving left and right but have the gun’s iron sight stay in the center of the screen. How can I do this?
Sway.getcf() is from an old module I scripted months ago and it’s pretty messy. I’m definitely gonna rewrite it but before I do that I need some sort of formula for keeping the sights in the center. I’m thinking CFrame.LookAt() has something to do with it.
I’ve also found a video further showing what I mean by this, just incase it was misunderstood
I might be far too late to the discussion, but I wanna add to what @dthecoolest was saying.
You can use the pivot point of the PrimaryPart.
What I did was, first I made the PrimaryPart’s CFrame match the camera’s with an offset. Then, I used the PivotTo and did PrimaryPart:GetPivot() * SwayOffset . It worked out pretty well, just look at this: