# Atan2 trouble

**URL:** <https://forum.kirupa.com/t/atan2-trouble/267204>\
**Category:** programming\
**Created:** [July 29, 2008, 6:28pm UTC](https://forum.kirupa.com/t/atan2-trouble/267204 "2008-07-29T18:28:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stupidsaint](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@stupidsaint](https://forum.kirupa.com/u/stupidsaint)\
**Post date:** [July 29, 2008, 6:28pm UTC](https://forum.kirupa.com/t/atan2-trouble/267204/1 "2008-07-29T18:28:43Z")

</div>

I have a kind of… well… tower defence game kinda deal that i’m making and there are a small problem with it.

I want the bullet to fire in the direction that the turret is facing and continue along that path. i already have everything else.

also i would like the turret to stick every 10 pixles to the grid… any way to do that?

please download the file and see what you can do. its also quite a cool game so you can have a look at the script too.

😃 thanks,

Stupid Saint

game on next reply
