So to start of with: I'm fairly sure that I am, but just trying to cover all my bases.
I'm trying to implement a frame rate independent acceleration based movement system.
The code that I have so far is as follows:
void Actor::Update(sf::Vector2f GravityStrength){
float UpdateTime = UpdateTimer.restart().asSeconds();
//Apply Gravity To velocity
ModVelocity(UpdateTime,sf::Vector2f(GravityStrength.x * Weight, GravityStrength.y * Weight));
//Checks for collision and moves the actor.
ComputeMotion();
}
void Actor::ModVelocity(float UpdateTime, sf::Vector2f Mod){
Velocity.x += Mod.x * UpdateTime;
Velocity.y += Mod.y * UpdateTime;
}
This results in the actor falling at double the speed if I double the frame rate, but if I set the Velocity to 0 at start of the "Update" function the falling rate becomes constant regardless of the frame rate. This leads me to believe that I'm using SFML correctly and there is just something wrong with the overall logic, but just asking to be sure and in case any of you would willing to help with a more general problem.