Using the simulator with 3.2 debug. I can draw the scene just fine, when I touch my sprite I'm expecting it to move but it's not :( I've taken a look at the sample code and several tutorials but can't seem to make any traction on this, any ideas?
In the init method I have:
self.isTouchEnabled=YES;
I also have a sprite which I've created and positioned with a 45 degree rotation and CGRect matching the sprite size.
My touches method:
// register touches
-(void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
if( touch ) {
CGPoint location = [touch locationInView: [touch view]];
CGPoint convertedPoint = [[CCDirector sharedDirector] convertToGL:location];
CGRect rect = CGRectMake(0, 0, 500, 800);
if (CGRectContainsPoint(rect, convertedPoint)) {
[player1 stopAllActions];
[player1 runAction: [CCMoveTo actionWithDuration:1 position:convertedPoint]];
//return YES;
}
}
//return NO;
}