[I already asked this question on the UDK forums, without much success though.]
I'm using a class derived from AIController
to control my pawn in RTS-style. My problem is that the pawn does not have a fixed Location.Z
so if his Velocity
in X and Y direction changes the Velocity.Z
also changes (for whatever reason). I have tried nulling the Velocity.Z
in the tick method, using Move
to move the character back to a constant height and some other things of which nothing had worked. How can I solve this?
TargetPawn.TakeDamage(10, SomeController, TargetPawn.Location, Momentum, class'DamageType',, Self);
where Momentum is a vector with its Z component set to 0. Both have the same result of also making the pawn lift off even though the added velocity/momentum in Z direction was 0. \$\endgroup\$Physics
other thanPHYS_Walking
? Setting the velocity anywhere else inside your Controller or Pawn? I'd say stick logs in directly before and after you set Velocity. Also if you haven't already, use an exec function to do nothing more than set the Pawn's Velocity. \$\endgroup\$