# Wrong texture position on camera move

When in my game i move my character, the camera follows it. I have no problem drawing this char when it is moving or moving another char when the camera is still. Now, when i move both of them, the texture position of the second character is wrong, you can see it here:

Under the hood i round the values before moving the viewport and drawing textures, and i had no problems except in this case. How can i fix this?

• Well first I don't see a problem with your image, if they are both moving left or right then that's what I'd say it looks like. Could you elaborate on exactly what you want to happen. Also it's hard to help out with no code to go by. – Christer Nov 29 '15 at 10:07
• hello @Christer, the problem is that they are actually moving at the same speed. I update brown with mu.p.x += 2.34f and before that, i set the green position to brown. So there shouldn't be any noticiable movement. – Newbe763547634 Nov 29 '15 at 10:11
• Wait... you set the green one to the brown ones position, then you change the brown ones position, and then you draw the screen? Thats not the order in which you want to do this. Change browns position before you set green to browns position. – Peethor Nov 29 '15 at 10:38
• @Peethor in that case, i would only see a green square. The point here is that, even tho both squares are moving at the same speed, the green one displays a weird behaviour when the viewport changes (maybe becuase of rounding?) – Newbe763547634 Nov 29 '15 at 10:52