I have a fairly simple animation with 8 identical sizes. I don’t use the built-in animation methods, since I want to manually control the animation speed on the fly. I use the preloaded SKTexture and execute [object setTexture: texture]; inside the update: currentTime method.
The problem is that sometimes the texture is really distorted / stretched. After much debugging, I narrowed it down only when the node is stationary. In fact, if I move the pixel node and move it back, then the problem never occurs:
[self setTexture:texture];
CGPoint currentPosition = self.position;
self.position = CGPointMake(currentPosition.x + 1, currentPosition.y + 1);
self.position = currentPosition;
It seems to me very cold-blooded. I think that under the hood it causes the parent node to be redrawn. Has anyone else experienced this? I have two main questions. 1) What is the reason? and 2) How can I resolve this without resorting to hacking?
Here is a normal frame and a stretched version (I apologize for the quality, filling art ...)


Edit: after a few comments, I realized that I forgot to mention that I reduced the size of the node to less than the size of the texture. Although the textures are the same size, applying the new texture to a smaller node causes an error.
source
share