Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
SetPosition and delta-time
Print
Pages: [
1
]
Author
Topic: SetPosition and delta-time (Read 1268 times)
0 Members and 1 Guest are viewing this topic.
JasonMcG
Newbie
Posts: 10
SetPosition and delta-time
«
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?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11032
Re: SetPosition and delta-time
«
Reply #1 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.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Hapax
Hero Member
Posts: 3379
My number of posts is shown in hexadecimal.
Re: SetPosition and delta-time
«
Reply #2 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).
Logged
Selba Ward
-SFML drawables
Cheese Map
-Drawable Layered Tile Map
Kairos
-Timing Library
Grambol
*
Hapaxia Links
*
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
SetPosition and delta-time