Tracking/Identifying individual touches on iPhone
I got this question the other day, how to track individual touches if you are using a couple of fingers for a game? Actually it’s pretty easy if you can access the touch previous position and it’s current position. Let’s start with a small class to store the information class Touch { public: Touch(); ~Touch(); void update_position(float x, float y){ _current_position.x = x; _current_position.x = y; } bool is_same_touch(float x, float y) { if(_current_position.x == x && _current_position.y == y) return true; return false; } protected: CGPoint _current_position; }; Let’s a assume the “move” movement ...