Hey.. Well in short here is the issue
Im using AddImpulse into my pawn and the impulse vector is the one i get from a trace,Now my issue with this is that the impulse doesnt take in mind the rotation as example
with the vector im using it makes the pawn fall forward but ONLY if i use it while im standing infront of the pawn
if i do the same but with me standing in the pawn right he still falls backwards instead of falling based on where it got hit , im using
So if i kick the player on his back he falls forward,kick him in the left,fall forward and so onCode:function KickTrace() { local Vector StartLoc2,EndLoc,HitLocation,HitNormal; local actor Result; local tfppawn hitpawn; local vector impulse; Pawn.Mesh.GetSocketWorldLocationAndRotation(KickSock, StartLoc2); // get start and end locations for the trace Pawn.Mesh.GetSocketWorldLocationAndRotation('R_JB_End', EndLoc); Result = Trace(HitLocation, HitNormal, StartLoc2, EndLoc,true,,,TRACEFLAG_Bullet); DrawDebugLine(StartLoc2, EndLoc,255,0,0,true); hitpawn = tfpPawn(result); if(Result != none ) { Result.TakeDamage( 10,self,HitLocation,HitLocation,class'FFDmgType',,); //Result.CollisionComponent.AddImpulse(Startloc2,HitLocation); `log("hit actor is"$Result); } if(hitpawn != none) { impulse = HitLocation; impulse.X = 0; impulse.Y = impulse.Y + 200; // i want the player to fall forward Hitpawn.Mesh.AddImpulse(Impulse,HitLocation); } }
if im right since im using Hit Location for the impulse shouldnt it use the rotation too?



Reply With Quote


Bookmarks