This is a discussion on [SFML C++] Sprite isn't cropped well for animation... that's the problem maybe. within the Game Programming forums, part of the General Programming Boards category; I'm not sure myself what has caused this problem. It seems to me that the code that I wrote was ...

I'm not sure myself what has caused this problem. It seems to me that the code that I wrote was right. Even when I cropped it manually (without the getSize().x function to check the sprite's width and pass it to setTextureRect(..) automatically),
the sprite still show unwanted frame.

Sorry if I can't explain the problem well. In short, the
tempSprite.setTextureRect(...) should show 1 frame corresponding to user's input (WSAD movement). Instead, the sprite shown is more than 1 frames, and all of them appear to move (or do run animation) simultaneously.

What's more confusing to me is the "line" that appears behind the character sprite (happens when the sprite 'move up', which is at the bottom of the image)