private void updateNotArrivedH ( double extrp ) { if ( fh < fhDest ) { fh += velocity * extrp ; if ( fh > fhDest - sensibility ) { fh = fhDest ; arrivedH = true ; } } else if ( fh > fhDest ) { fh -= velocity * extrp ; if ( fh < fhDest + sensibility ) { fh = fhDest ; arrivedH = true ; } } }
Update the force if still not reached on horizontal axis .