I have a code that set's a bow's angle according to where you have touched the screen. a simple "bow.rotation = X" command is performed on the ccTouchesMoved event. the problem is, that while running the code on 0.7.1 of cocos2d against 0.9 or 0.8.2 it worked way better, in 0.9 and 0.8.2 it seems like it skippes some of the touchesmove event... what could it be? heres the code...:
-(BOOL)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView: [touch view]];
location = [[CCDirector sharedDirector] convertToGL: location];
if(player.state == StateNotPrepared) {
if(CGRectContainsPoint(spriteToRect(fireButton), location)) {
[player prepareShot];
[powerMeter resetBar];
[powerMeter startLoadingBar];
} else {
float newAngle = [player angleByTouchPoint: location];
[self setAngles: newAngle];
}
}
return kEventHandled;
}
-(BOOL)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView: [touch view]];
location = [[CCDirector sharedDirector] convertToGL: location];
if(player.state == StateNotPrepared || player.state == StatePrepared) {
if( !CGRectContainsPoint(spriteToRect(fireButton), location) ) {
float newAngle = [player angleByTouchPoint: location];
[self setAngles: newAngle];
}
}
return kEventHandled;
}