Alright, I think I am able to follow what you guys are getting at. I tried to alter my code some, and the result was much better, but with one little hiccup. No matter what the distance my sprite goes, it always covers it within 2 seconds. How can I alter my current code so that the sprite covers any distance at a constant speed?
Code:
if (App.GetInput().IsMouseButtonDown(sf::Mouse::Left)) {
NewX = App.GetInput().GetMouseX();
NewY = App.GetInput().GetMouseY();
Clock1.Reset();
}
//Clock
float ElapsedTime = Clock1.GetElapsedTime();
//Initialization of translation
sf::Vector2f NewPosition(NewX, NewY);
float duration = 50;
sf::Vector2f OldPosition = PlayerObj.GetPosition();
sf::Vector2f Movement = NewPosition - OldPosition;
//Update translation
ElapsedTime += App.GetFrameTime();
float progress = ElapsedTime / (duration);
sf::Vector2f Current = OldPosition + Movement * progress;
PlayerObj.SetPosition(Current);
App.Draw(PlayerObj);