Notifications
ZI
2D Object Gesture Interface Engine Demonstration
Showcase
6
0

Long time developer, tutorial creator and giver - new to Unity. Am excited to contribute to the unity community. Quick Demo: https://youtu.be/ki7JGyZ190c Quick Usage Tutorial: https://youtu.be/inqp288i0KI Examples of my non-unity coding work can be found at my popular youtube channel, and I can be reached for Q&A at the youtube channel, and facebook page.
Youtube Channel: https://www.youtube.com/channel/UCWTzjwD6ps1GELhvubxLb2Q
Developer Website: https://www.clientuser.net/
Facebook Page: https://www.facebook.com/clientuser.net
Product suppor also available at: support@clientuser.net
This particular "GestureEngine"
GestureTransmitter.cs - Broadcasts gestures generated on your touch screen by your finger. GestureReceiver.cs - Any object with this attached will receive gesture signals.
Usage:
1) Attach the GestureTransmitter script to an Orthographic camera viewing your 2D objects.
2) Copy the GestureReceiver to a new script, rename it and its class, attach it to your object or prefab.
3) Make sure your object has a 2D collider.
That is it!!!
Turn gestures on and off (tune) the GestureReceiver script by finding and editing the following lines near the top of the GestureReceiver script.

objectTouchRecord.FollowPath_switch = false; objectTouchRecord.GestureDragObject_switch = false; objectTouchRecord.GestureTapDownHold_switch = true; objectTouchRecord.GestureLongTapDown_switch = false; objectTouchRecord.GestureTapDown_switch = false; objectTouchRecord.GestureDoubleTap_switch = false; objectTouchRecord.GestureSwipeIntoObject_switch = false; objectTouchRecord.GestureSwipeThroughObject_switch = false; objectTouchRecord.GestureTapDownSwipeOutOfObject_switch = false; objectTouchRecord.GestureTapDownLiftFinger_switch = false; objectTouchRecord.GestureSwipeIntoObjectLiftFinger_switch = false;
Each switch has a corresponding method, e.g.
objectTouchRecord.GestureDoubleTap_switch = true;
will call the method, it is here you need to place your own rection logic.
void GestureDoubleTap()
{
//Do something. Or leave empty - your choice.
}
Of course, some gestures are incompatable and there is interference between gesture signals.
There is a method called AnalyseGestureSwitches() in the GestureReceiver script,
it contains logic of suggested overides for gestures.
You can leave it as it is or modify which gesture overides which.

ZI
Zoran Ilievski
Mr - Programmer
4
Comments