- Home /
Is it possible to detect which side of a sprite a touch came in from?
Been trying to find a solution or something to get me going, but have struggled so far.
So what I am looking at doing, is let's say I have a sprite, 100x100 and I touch the screen away from the sprite and drag onto the sprite. Can I detect whether it was from left, right, top or bottom, that the touch came in from?
To clarify the Sprite has a trigger, I can detect it has been hit. Just need to find a way to determine from which side.
Why not save the initial touch position and check the difference if your trigger triggers?
I do, but I can't get it to deter$$anonymous$$e which side out of the 4 sides was hit.
Your answer
Follow this Question
Related Questions
Why doesn't OnTriggerEnter2D get called? 1 Answer
Unity2D: Renderer off/ on by triggers 0 Answers
Can't click gameobject when over another trigger? 1 Answer
Check Trigger Collision's Name/Tag 1 Answer
Wanting to have a sprite animation to only start playing once the player collides with it? 1 Answer