0

I have some question for my game formula.

Let say we have :

  • Velocity : 5
  • Friction : 0.9
  • and Time : 0 (time increase by 1 for simplify)

Over the time velocity will decrease by the friction. (v = v . fr)

And for the decrease velocity at delta time is : (vt = fr^t . v)

Please see this chart

As you can see on the image velocity(green line) is decrease over the time(yellow line).

Now i need a formula to find the red line or sum of velocity over the time.

Because if the velocity is constant or not reduce by friction i can just multiply it by the time. That why i belive there is somehow has a formula to solve this problem.

I really need this formula because with it i don't need to update my game object in every frame, i just use that formula to calc how much offset for the object move by delta time.

Spektre
  • 49,595
  • 11
  • 110
  • 380
  • This is off-topic for Stack Overflow. Also, your notation doesn't make sense to me. You seem to be doing this in discrete time steps, which will give different results than what you'd get in continuous time. – Thomas Jager Aug 20 '19 at 13:57
  • you may miss understood for my question dude, it may be because my english is not to good. As you can see the time is increase constant by 1 just velocity decrease by the friction over the time. the notation above is allready proof and correct to solve the green line. – LeoDielmoViel Aug 20 '19 at 14:08
  • Newton/D'Alembert physics is the way see [How to calculate rocket?](https://stackoverflow.com/a/53986426/2521214) or [Can't flip direction of ball without messing up gravity](https://stackoverflow.com/a/53637567/2521214) – Spektre Aug 21 '19 at 06:07
  • thank's all, this allready solved and work like a charm :) – LeoDielmoViel Aug 21 '19 at 11:40

0 Answers0