WHAT’S THIS? #
Shape recognizer is a component that detects shapes drawn by the user. To be more precise, it recognizes shapes designed by you (virtual shape asset).

A virtual shape designed by the developer
HOW TO ENABLE SHAPE RECOGNITION? #
Go to Project Settings > Plugins > Touch Interface and in the Shape Recognize category, check the Enable Shape Recognizer setting. Then you just need to add the Shape Recognizer component on a class where you want to bind a function to a gesture.
SHAPE RECOGNIZER COMPONENT SETTINGS #
Shape
- Virtual Shape : Shape you want that this manager recognize.
HOW TO GET EVENTS? #
In the events part of the component, you just have to click on the event you want to retrieve. You can bind/unbind a function too if you want.
The current events in v2024.1 :
- On Draw Begin : Called when user start drawing. Can be called up several times if the user draws a shape in multiple steps.
- On Draw End : Called when the user has finished drawing or when he pauses (multi-step drawing).
- On Shape Detection Success : Called when the user types several times.
- On Shape Detection failed : Called when the user’s finger remains in contact with the touchscreen without moving for a specified time.
