Here is some pseudo code (mostly untested, but just to show the general idea):
Code:
// this assumes that the Physics is something like PHYS_Flying, or maybe even PHYS_None,
// that the target location is stored in a vector called VTarget, and that this code is in your pawn class
function tick(float DT){
local vector DeltaMove;
local float fTargetDist;
DeltaMove = Velocity*DT + Acceleration*DT*DT; // this also assumes that you are properly updating the velocity vector somehow and that this is pointing at your target for movement
fTargetDist = VSize(VTarget - location);
if( VSize(VTarget - (location + DeltaMove)) > fTargetDist)
DeltaMove = Normal(DeltaMove) * fTargetDist;
MoveSmooth(DeltaMove);
}
Bookmarks