Hi All,
I'm just getting started with SFML and C++ in general so apologies if this is a very basic question.
I'm trying to move a sprite as below using delta time to smooth the movement (simplified for clarity).
float deltaTime = 1.0f/window.GetFrameTime();
sf::Vector2f moveVector;
moveVector.x = 10.f * deltaTime;
sprite.Move(moveVector);
window.Draw(sprite);
When using delta time my sprite wont draw which I'm guessing is due to the type conversion between Uint32 and float.
What would an appropriate method of converting the correct value? I have tried a few conversion methods I found on the web but none seem to resolve the problem.
Thanks for your time.