Questions tagged [touches]
231 questions
-1
votes
1 answer
Detecting number of touches
guys, I want to set actions to touches. If people make single touch - one action, else - different.
I've written this code in my touchesBegan method:
UITouch *touch = [event.allTouches anyObject];
BOOL tappedTwice = NO;
if…

werbary
- 1,105
- 2
- 14
- 43
-1
votes
1 answer
Detect long touch in Unity 3D
I'm trying to detect long touch on the screen by using Time.time or Time.deltatime, but nothing works.
It should turn out like this: after beginning TouchPhase.Stationary (or Began) timer should goes on, then after TouchPhase.Ended timer can be…

Nickana
- 3
- 5
-1
votes
1 answer
Unity Android Touch Handle
i have this code in my script
its working fine in my first scene. it means i,ll click on an
Special object collider and i can do something . but in another scene it works only when my player is in the collider . and when player is in . touching any…

sandy mokarrami
- 89
- 1
- 10
-1
votes
1 answer
Tracking multiple touches as CGPoints in Swift
So this has been stumping me for a while. I'd like to track multiple touches at the same time on the iPhone for a game, storing them as CGPoints and analyzing their movements in real time (probably within the touchesMoved func) to perform actions in…

oaSysFox
- 1
- 1
-1
votes
1 answer
Moving objects according to touchesMoved
So I'm trying to move an object using the touches moved function, however I'm not sure how to do that when the coordinates are not predetermined. This is what I've got going :
override func touchesMoved(touches: NSSet, withEvent event: UIEvent) {
…

Mats
- 359
- 2
- 6
- 13
-2
votes
1 answer
Cocos2d problems, after a few scene changes, touches on sprites at screen edge not working
My game app is nearly finished, but i still have to overcome a strange problem.
The game is about touching sprites, when touched they rotate.
But after a few scene changes or in other word, level chances, the sprites on the border of the iphone…

Johan Sneek
- 49
- 1
- 6