The Hedgehog Team Community

General Category => EasyTouch => Problem with EasyTouch? => Topic started by: karonte on February 16, 2018, 01:49:50 PM

Title: Mouse + Touch Support
Post by: karonte on February 16, 2018, 01:49:50 PM
Hi guys!
I'm working on a software that has to be compatible both with touch and mouse inputs.
Since i need to move and rotate several 3D objects in the scene, i thought of doing somethig like this:

- for moving the obj: a simple drag on the obj. No problems here, Easytouch handles perfectly both mouse and touch.
- for rotation, when using a mouse: a right click drag on the obj
- for rotation, when using touch: a twist on the obj

In conclusion: i need to differentiate between left and right mouse buttons, clicks, drags. Plus, i need the whole Easytouch system (i'm already using drag2fingers and Pinches to move the camera, and other things). So I thought of using both the normal Unity Eventsystem and Easytouch, together.

The problem is: as soon as I add a Unity Graphic Raycaster to the camera, i suddenly cannot receive any Easytouch event on the objs anymore. If i mask them on a non raycastable layer they work again, but i cannot use them with the basic Eventsystem. It looks like the Raycaster is overriding the Easytouch system.

What to do? Any suggestions?
I'm fine using only Easytouch if possibile, but i really need to differentiate left clicks/right clicks/wheelscrolls, drag/clicks on single objects or outside them.