Hello guys, I have a problem, as I know, SetFramerateLimit calls Sleep() to keep game framerate probably constant, but here's the problem, when I use
int main() {
RenderWindow Window(VideoMode(1024,768), "Window");
Window.setFramerateLimit(60);
RectangleShape rs;
rs.setSize(Vector2f(50,50));
rs.setPosition(0,0);
while(Window.isOpen()) {
rs.move(5,0);
Window.draw(rs);
Window.display();
Window.clear();
}
return 0;
}
that rectangle is moving very sharply every random frame and it can also move a bit back, or a bit forward, I don't know how to fix this :c