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 ...
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, &...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
physics × 2392unity × 672
collision-detection × 369
2d × 349
c# × 275
mathematics × 211
box2d × 187
movement × 143
c++ × 133
physics-engine × 124
collision-resolution × 122
rigidbody × 111
java × 101
xna × 95
3d × 88
platformer × 70
rotation × 63
simulations × 61
vector × 60
javascript × 58
libgdx × 55
projectile-physics × 55
rigid-body-dynamics × 54
bullet-physics × 48
opengl × 43