Hot answers tagged

13 votes
Accepted

How hard to brake to perfectly smoothly reach the destination?

When an object brakes with a constant deceleration, then its velocity over time looks like this: Distance traveled is velocity multiplied with time. So the orange area in the graph above actually ...
Philipp's user avatar
  • 119k
3 votes

How hard to brake to perfectly smoothly reach the destination?

The simpler approach, but still somewhat smooth By approximation, we could create such a braking curve and this would work for a kind of "smooth" braking: $$ f(t) = \begin{cases} 2t-2, &...
Raf's user avatar
  • 131
3 votes

How hard to brake to perfectly smoothly reach the destination?

This is a methodology I adopted when designing an automated model train system where the train had to stop at a signal. The physics is much the same as Philipp explains, although I took a slightly ...
user85471's user avatar
  • 131
2 votes

Pin object to the end of a rope

So, after some trial and error was able to reproduce something not that terrible!!! Ended up ditching verlet and dealing only with spring instead. Here's the result: Here's the working source code ...
Ainsley Harriott's user avatar
1 vote
Accepted

Game Physics Engine : Euler integration : why body under gravity is not covering 9.8 meters/second?

the speed of the object after 1 second will be 9.81 m/s. However it starts at 0 and increases to 9.81 m/s. So all that time in that first second the speed of the object is less than 9.81.
ratchet freak's user avatar
1 vote

Implementing framerate independent friction with linear deceleration

The problem you're running into is that you're performing numeric integration with a varying step size. In all but the simplest case (movement at a constant speed), this produces results that vary ...
Mark's user avatar
  • 344
1 vote

Momentum of a ball on a moving platform

Other than the mentioned friction on the sphere body you could try looking into matrix multiplication. Transform the sphere matrix with the platform matrix then setting the resulting velocity vector ...
mouse's user avatar
  • 111
1 vote

When should I call the physics simulation within the game loop?

I'd recommend running the physics step before your other update code. That gives code in your UpdateScene function a chance to react to things that changed in the ...
DMGregory's user avatar
  • 134k
1 vote

Why is my spring exploding? And how to fix it?

Your problem: using a Discrete Feedback Model What this means is that your future spring's state depends on its current state. The force actively changes depending on what position it is right now. ...
magik8ball's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible