Graphics Programs Reference
_destinationPositionX = _destinationPositionX +
_destinationPositionY = (_slopeZ *
_destinationPositionX) + _interceptY;
As the motion of the missile is confined in the x-y plane, using the slope-intercept
equation we can interpolate the source position to obtain the destination position at
the end of each frame.
The method filter() in Listing 6-9 is used to adjust the slope. For angles lying
the missile source position.
slope cannot be directly used to interpolate the missile source position, which is why
it has to be adjusted.