|
Post by Jesse on May 4, 2017 15:27:20 GMT
I'm using the Pan and Zoom feature. I have a lot of worldspace UIs that are draggable and scrollable. I would like to be able to pan with Shift+Left Mouse Button and zoom with Shit+Scrollwheel.
Right now, my target build is desktop only so, touch controls are not critical. However, there may be a time in the future when I reconfigure this game for mobile....
|
|
|
Post by Luís Pedro Fonseca on May 4, 2017 22:30:20 GMT
Hi Jesse,
Since it doesn't make sense for ProCamera2D to handle all possible input methods, I left these kind of options out of the package.
However, it's very easy to achieve this. Simply duplicate the PanAndZoom extension and rename it to something else (change the filename, the class name and the name property at the top of the class). This way you can make changes without having to worry about future ProCamera2D updates interfering.
Afterwards, go through the newly created extension and add a check for the shift key where you see fit. Resulting in something similar to this:
if (UsePanByDrag && Input.GetMouseButton(0) && Input.GetKey(KeyCode.Shift)) { // }
|
|