i have a problem with texture in SpriteKit game:
in touchesBegan
i do:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInNode:self];
SKNode *node = [self nodeAtPoint:location];
if ([node.name isEqualToString:@"worm"]) {
[node removeAllActions];
SKAction *change = [SKAction setTexture:[SKTexture textureWithImageNamed:@"worm2"]];
[node runAction:change];
this code works but the new texture "worm2" is scaled, and you see bad compared to how it should.
From Apple Documentation, https://developer.apple.com/library/ios/documentation/SpriteKit/Reference/SKAction_Ref/Reference/Reference.html#//apple_ref/occ/clm/SKAction/setTexture:resize:
there should be the method: setTexture:resize:
but as you can see from the picture that I put, this method is not present..
What am I missing?
thanks everybody