SFML community forums

Help => General => Topic started by: JasonMcG on October 04, 2017, 07:49:43 pm

Title: SetPosition and delta-time
Post by: JasonMcG on October 04, 2017, 07:49:43 pm
Hi,

If I am using move(x, y), I know yo should multiply by delta-time to ensure the frame rate is correct.

If I am using setPosition(x, y), do I still need to use delta time?
If so, how would I use delta-time?
Title: Re: SetPosition and delta-time
Post by: eXpl0it3r on October 04, 2017, 08:53:55 pm
How do you determine x and y?
Do you really understand the concept of multiplying by delta time? Because it has nothing to do with the function that gets called.
Title: Re: SetPosition and delta-time
Post by: Hapax on October 05, 2017, 02:18:47 pm
"move(offset)" is effectively just "setPosition(getPosition() + offset)" so multiply your delta time in the same way (with the offset only).