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:
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:
- 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.