T
TiuZero
Guest
I'm trying to create a knockback system in a platform game, I'm using this
other.hspd = knockBackhspd * sign(other.x-x);
other.vspd = -knockBackvspd
but he only throws the player up, I wanted him to play left and right, I tried to change and add some things, but nothing works, what can I do? can you help me? or if you know of an alternative method please tell me.
other.hspd = knockBackhspd * sign(other.x-x);
other.vspd = -knockBackvspd
but he only throws the player up, I wanted him to play left and right, I tried to change and add some things, but nothing works, what can I do? can you help me? or if you know of an alternative method please tell me.