# Coding examples of how to allow to fire a projectile in the direction the player is facing using the raycasting 3D extension

**URL:** <https://forum.makecode.com/t/coding-examples-of-how-to-allow-to-fire-a-projectile-in-the-direction-the-player-is-facing-using-the-raycasting-3d-extension/30535>\
**Category:** Help\
**Tags:** game\
**Created:** [September 11, 2024, 2:40pm UTC](https://forum.makecode.com/t/coding-examples-of-how-to-allow-to-fire-a-projectile-in-the-direction-the-player-is-facing-using-the-raycasting-3d-extension/30535 "2024-09-11T14:40:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ru040076](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ru040076/32/15560_2.png) [@ru040076](https://forum.makecode.com/u/ru040076)\
**Post date:** [September 11, 2024, 2:40pm UTC](https://forum.makecode.com/t/coding-examples-of-how-to-allow-to-fire-a-projectile-in-the-direction-the-player-is-facing-using-the-raycasting-3d-extension/30535/1 "2024-09-11T14:40:40Z")

</div>

Can someone give me a coding example of how to have projectiles fire from where the player is facing?

(My project is [Tower Game](https://arcade.makecode.com/S19152-75176-83001-54100))
