Rotating object with mouse in viewport

I’m making an FPS shooter and I started making a skin system, but I had a very huge question. How to Rotate an object with the mouse in the viewport?

4 Likes

It’s not super simple, but here’s an old implementation you can use for whatever you want:

DraggableViewportFrame2.rbxl (93.3 KB)

21 Likes

Thank you very much, it helped me a lot!

1 Like

How can the code be modified to not use a viewport frame (as it can get quite grainy) and instead use the camera directly?

I tried reading this code and it makes absolutely no sense. Can you please explain it?