- Home /
on touch play animation in android devices.
Hi , Everyone
I want to make app like talking tom for android devices.
so i want to know that how can i play animation when someone touch the body part of the character.
or there's some another technic to do this like touching on specific parts of the screen.
????
thanx
Answer by dannyskim · Mar 23, 2012 at 11:22 PM
Well, there are several ways to go about doing this.
Raycasting against colliders on your character to start the animation:
http://unity3d.com/support/documentation/ScriptReference/Physics.Raycast.html
Detecting touch position on a certain area of the screen:
http://unity3d.com/support/documentation/ScriptReference/Touch-position.html
Input.mousePosition tracking:
http://unity3d.com/support/documentation/ScriptReference/Input-mousePosition.html
As far as getting these to work, look at some tutorials. These are basics that you should learn on your own.
Your answer
![](https://koobas.hobune.stream/wayback/20220613065437im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to get position of touch on touch screen 1 Answer
appear android touch key board 0 Answers
Android Drag By Steps 0 Answers
Detecting onDrag over UI images 1 Answer
Moving the camera on a touch imput 0 Answers