i have this void function that makes a sprite move if a touch is detected:
-(void) ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:[touch view]];
location = [[CCDirector sharedDirector] convertToGL:location];
car.position = ccp(0,10);
}
the game runes fine, but when i touch the screen it freezes when its meant to move the car sprite, thanks for your help!!
1 way is
it will directly place your car at your touch.
Other way is
Check for spelling. I dnt have IDE to check every spelling. 🙂
Hope this helps