News: Enjoy our Christmas offer 30% off on our latest package Tower Defense Level Kit

  • March 26, 2019, 11:45:32 PM

Login with username, password and session length

Author Topic: Mouse + Touch Support  (Read 468 times)

Offline karonte

  • Newbie
  • *
  • Posts: 1
Mouse + Touch Support
« 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.
« Last Edit: February 16, 2018, 01:54:40 PM by karonte »

There are no comments for this topic. Do you want to be the first?