- Home /
Question by
kiran_zabuza · Jul 24, 2014 at 10:48 AM ·
multitouch
how to drag single sprite among multilple sprites on screen ?
We have created multiple sprites on screen in unity 2d . So now we need to drag single sprite on touch.We used multiple touch functionality.Problem comes when we drag a sprite then another sprite on the way also moving with we actually try to drag.
Comment
Put your questions on unity answers in proper way please:) (I think you are new at this..no probs) and Add your script here which you used to drag sprites so that i can help you with that actually.
Answer by king_ · Jul 24, 2014 at 02:13 PM
use OnMouseDrag()
like.
OnMouseDrag()
{
transform.position = Input.MousePosition;
}
//it will do what you are trying to do even in mobile
Your answer
Follow this Question
Related Questions
How to create sprites in unity at runtime ? 0 Answers
A node in a childnode? 1 Answer
Multiple plugin conflict 8 Answers
Help Understanding the Use of Unity with Android 1 Answer
Handle device offline status 0 Answers