Using plugin widget GUI mouse dragging to change a ViewportFrame camera CFrame

My goal is to have a widget plugin with a viewport frame in which you can change the ActiveCamera’s CFrame by clicking and dragging within the ViewportDisplay.

So far I have the widget plugin and viewport display setup with the ActiveCamera being able to be manipulated. Currently I am using InputService but am not sure how to proceed with using the click and drag movement to change the orientation of the ActiveCamera. I am aware of GetRelativeMousePosition which seems to be the only way to get mouse activity in widget plugins, but would appreciate suggestions as to how I could approach this.

1 Like