I'm trying to get the location of the touch event on the screen from
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
.
What code can I use to read the touch coordinates? I've gotten this far so far:
NSLog(@"Touch data: %@", [NSString stringWithFormat:@"NSSet: %@",[touches description]]);
I'm trying to make a game using an OpenGL template application. The touches will only register in the EAGLView
file, not the ESRenderer1
file. I assume that I should use the EAGlView to set variables and then read the variables from there into the ESRenderer to perform game calculations. Is this a good approach?