How to trigger Camera Pan On Touch Drag of Gui element As it It weren't being touched

So I have a joystick Gui element that players drag to throw a smoke bomb:

The problem is that I use a shoulder camera and the smoke bomb is thrown out using a ray from the center of their screen (crosshairs):

What I need to happen while the player is dragging this joystick is to pan the camera similar to the normal way when you touch drag on the screen anywhere else: (1)

I need the camera to move as if it was a normal pan touch drag pan (like second video). Only I need to be able to control how much it pans (since the joystick area is smaller, I will need to control the amount it pans).

My thoughts so far:

  1. Is the a way to trigger the normal touch/drag events (passing in vars) to trigger the camera pan?

What’s the best way to programmatically trigger the camera pan to pan as normal (left, right, up, down and amount to pan)?

Looked on developer and just am lost what’s the best way.


So one solution I have found is to set the Frame and the btn Active property to false. This Allows the touch drag event to pass through and trigger the normal camera panning movement while still moving my draggable button.

This is close enough: