# Bullet and enemy push-back

**URL:** <https://forum.kirupa.com/t/bullet-and-enemy-push-back/316791>\
**Category:** flash\
**Created:** [December 2, 2010, 2:20pm UTC](https://forum.kirupa.com/t/bullet-and-enemy-push-back/316791 "2010-12-02T14:20:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvrb](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mvrb](https://forum.kirupa.com/u/mvrb)\
**Post date:** [December 2, 2010, 2:20pm UTC](https://forum.kirupa.com/t/bullet-and-enemy-push-back/316791/1 "2010-12-02T14:20:58Z")

</div>

Hey everyone. I’m creating a Zombie game. I’m trying to code an effect, that will push the enemy back when hit. It has to be pushed in the same direction, as the bullet is flying. Something like:  
Enemy.x -= Bullet.rotation;  
Enemy.y -= Bullet.rotation;  
I really don’t know how to do it, so no matter which way the bullet is flying, the enemy will be pushed in the same direction. Could anyone please help me with this?  
Regards,  
Mathias

_EDIT_  
I fixed it, it works now!
