# Turret with mouse aim

**URL:** <https://forum.kirupa.com/t/turret-with-mouse-aim/134246>\
**Category:** Uncategorized\
**Created:** [January 16, 2005, 2:08pm UTC](https://forum.kirupa.com/t/turret-with-mouse-aim/134246 "2005-01-16T14:08:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VoS](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@VoS](https://forum.kirupa.com/u/VoS)\
**Post date:** [January 16, 2005, 2:08pm UTC](https://forum.kirupa.com/t/turret-with-mouse-aim/134246/1 "2005-01-16T14:08:50Z")

</div>

Hello there!  
i have a small problem which i would like help with )

im making a game in which u at one point controll a turret  
to represent the turret i have a small box  
with a half circle lying on the side on top of it  
for barrel i have a long rectangular box thats positioned at the top center of the box so that the half circle covers half of it… ( hope all that made sence)  
now anyways to the part that i need help with

i want the barrel of the turret to always be rotated so that is facing/ponting at the mouse  
and when mouse1 is pressed i want a projectile to be fired from the barrel in the direction of the mouse…  
trigonometry is not my strongest subject so id really appreciate some help  
and id be happy to explain this further if i dident make any sence
