I would like to know how to limit a viewmodel’s weapon sway to a circle similar to Deadline and Insurgency, where if the viewmodel attempts to exit this limit, it will essentially just lock itself at that point in the circle’s circumference even when moving the camera.
I have attempted to try to figure out how to do this, from searching about this topic about limiting the end position of 3D objects to the circumference of a circle while rotating around an origin point. There is nothing about this topic as far as I’ve searched. Some solutions I’ve tried included using the camera CFrame, but I’ve tested that the mouse delta works better for this.
Basically, all in all, I want to know how to limit the end position of a view model while rotating around some sort of origin point using mouse delta. I’d be glad if someone pointed me in the right direction.
Example: