Okay so i used the TakeDamage Function for the push effect but i am not getting the desired result. I need the player to jump back a little when he collides with the enemies.
This is my Bump Function
Code:
event Bump(Actor other,PrimitiveComponent OtherComp, vector HitNormal)
{
if( AITestNewEnemy(other) != none && !bInvulnerable)
bInvulnerable = true;
SetTimer(InvulnerableTime,false,'EndInvulnerable');
TakeDamage(AITestNewEnemy(other).BumpDamage,none,Location,vect(0,0,1)*2.5f,class'UTDmgType_LinkBeam');
}
I am not good with physics and maths so if any one can help me out with a formula to calculate momentum that would result in a push effect backwards.
Bookmarks