Skip to main content
Added how to solve for `t0`.
Source Link
Anko
  • 13.4k
  • 10
  • 55
  • 82

I'm assuming you want only 1-dimensional movement; movement in a straight line.

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)


Edit: So how do you calculate how long the ball takes to get there in the first place? It's a little harder, since t is quadratic, but it's still high-school maths.

Here's a sketch:

How you might go about calculating the initial time

Now we could substitute the red equation for t0 into that last equation for a, but it would get messy.

I'd recommend just working it out in two steps like that.

To reiterate:

  1. Use your known values to solve s = u*t0 + a*t0*t0*/2 for t0 to get the time the ball takes to get to its destination.
  2. Rearrange s = u*t + a*t*t*/2 to solve for the new acceleration value a.
  3. Substitute t0 + desiredDelay for t.
  4. Solve for a.

I'm assuming you want only 1-dimensional movement; movement in a straight line.

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)

I'm assuming you want only 1-dimensional movement; movement in a straight line.

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)


Edit: So how do you calculate how long the ball takes to get there in the first place? It's a little harder, since t is quadratic, but it's still high-school maths.

Here's a sketch:

How you might go about calculating the initial time

Now we could substitute the red equation for t0 into that last equation for a, but it would get messy.

I'd recommend just working it out in two steps like that.

To reiterate:

  1. Use your known values to solve s = u*t0 + a*t0*t0*/2 for t0 to get the time the ball takes to get to its destination.
  2. Rearrange s = u*t + a*t*t*/2 to solve for the new acceleration value a.
  3. Substitute t0 + desiredDelay for t.
  4. Solve for a.
Outlined assumptions made.
Source Link
Anko
  • 13.4k
  • 10
  • 55
  • 82

I'm assuming you want only 1-dimensional movement; movement in a straight line.

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)

I'm assuming you want only 1-dimensional movement; movement in a straight line.

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)

Source Link
Anko
  • 13.4k
  • 10
  • 55
  • 82

As you say, s = ut + a*t*t/2, where u is initial velocity, a is acceleration and t is time. Rearranging for a gives a = 2*(s - u*t) / (t*t).

To arrive at a different time, just substitute a different value for t. To get a feel for how it works, you could try it on Wolfram Alpha.

Note that if your physics are using approximating reality by running a calculation every step rather than actually following a differential equation curve (i.e. Euler integration), this won't quite match up. (Though with small and frequent steps, it's really close.)