Skip to main content
deleted 3 characters in body; added 4 characters in body
Source Link
Steak Overflow
  • 332
  • 1
  • 3
  • 15

Look up how Unity‘s FixedUpdate solves this: it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. 
It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. 
Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

Look up how Unity‘s FixedUpdate solves this: it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

Look up how Unity‘s FixedUpdate solves this: it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must account for occasional frame drops and your physic simulations must not depend on time deltas. 
It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. 
Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

deleted 62 characters in body
Source Link
Steak Overflow
  • 332
  • 1
  • 3
  • 15

If you are in Unity useLook up how Unity‘s FixedUpdate for your physics calculations. If you are not, look it up anyway sincesolves this: it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

If you are in Unity use FixedUpdate for your physics calculations. If you are not, look it up anyway since it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

Look up how Unity‘s FixedUpdate solves this: it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

deleted 79 characters in body; added 69 characters in body
Source Link
Steak Overflow
  • 332
  • 1
  • 3
  • 15

If you are in Unity use FixedUpdate for your physics calculations. If you are not, look it up anyway since it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. If 1 frame takes very long, say 0.20s, Unity runs FixedUpdate 10will always run this 50 times (resulting from 0.20/0.02) before ending the full loopper second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

If you are in Unity use FixedUpdate for your physics calculations. If you are not, look it up anyway. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. If 1 frame takes very long, say 0.20s, Unity runs FixedUpdate 10 times (resulting from 0.20/0.02) before ending the full loop. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

If you are in Unity use FixedUpdate for your physics calculations. If you are not, look it up anyway since it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas. It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread. Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.

added 233 characters in body
Source Link
Steak Overflow
  • 332
  • 1
  • 3
  • 15
Loading
Source Link
Steak Overflow
  • 332
  • 1
  • 3
  • 15
Loading