For any maths people out there, I need a method for predicting the future position of body, given an amount of time in the future as an argument. I am using arcade physics and the body has drag applied and useDamping set to true, so the drag effect needs to be taken into consideration.

I know there is a maths equation for estimating this (ut+1/2at^2), but I cannot get that to work with arcade physics.

Instead I have a work around method where I am iterating through frames to work out the position through accumulation. See below. But this is inefficient and unsatisfactory and I expect this can be achieved without any loops at all by using a simple equation.

If anyone with a maths brain has a better solution it would be greatly appreciated.

Cheers.

```
public futurePosition(time: number): Phaser.Math.Vector2 {
const DELTA = 1 / 60; // Assume we are running at 60fps.
const position = this.position.clone(); // Current position of body
const velocity = this.body.velocity.clone(); // Current velocity
// Inefficiently looping through frames
for (let i = 0; i < time / (DELTA * 1000); i++) {
velocity.x *= Math.pow(BALL_DRAG, DELTA);
velocity.y *= Math.pow(BALL_DRAG, DELTA);
position.x += velocity.x * DELTA;
position.y += velocity.y * DELTA;
}
return position;
}
```