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

Get closest point on box to line

I wasn't happy with any of the answers here, as I wanted an answer for the 3D case, so I went ahead and wrote a shadertoy which demonstrates how to query the closest point between a line and a box. ...
Nate Morrical's user avatar
1 vote

Mirroring a Character's Position In a Shadow After Rotating 180 Degrees

Cache the shadow's authored horizontal offset from the sprite either at edit time or on spawn: ...
LudoProf's user avatar
  • 117
1 vote

How to rotate spaceship quaternion to face target direction with constant angular speed?

I got it. I was nearly there for ages, and flipping the multiplication on the final statement (rotationToApply * orientation, not orientation * rotationToApply) fixed it. Apparently whether you are ...
Tachytaenius's user avatar
1 vote

Max velocity for smooth deceleration to destination

Just work backwards to set up a "glide path" are the closest points/maximum speeds you can get without overshooting: If you arrive to the destination at max 2f/s velocity and then change it ...
MadMan's user avatar
  • 743

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