-
Notifications
You must be signed in to change notification settings - Fork 66
Beginner help #684
I would like to ask you a question, when setting the running time, the actual dt is always inconsistent with the dt I set, may I ask where the problem is? Thank you all for your help!
All reactions
Replies: 1 comment
The inconsistency you’re experiencing could be due to several reasons. Here are a few possibilities:
Frame Rate Dependency: The value of dt (delta time) can fluctuate based on the frame rate. If the frame rate is inconsistent, the dt value will also be inconsistent/
Engine Functions: The time it takes to perform certain engine functions both before and while setting up events cannot be guaranteed.
Physics Time vs Real Time: In some systems, the dt parameter isn’t real time but physics time. This can cause discrepancies if you’re expecting it to be real time.
Imprecision in Timers: Timers in some systems aren’t perfect and have a certain degree of imprecision. This can cause the actual dt to differ from the set dt.
To address these issues, you might want to consider using fixed time steps or smoothing techniques to average out the dt over several frames. However, the best approach would depend on the specifics of your system and application. I hope this helps! 😊