Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Projectiles

Quick Update

As you can see from the gif above, I decided to add a projectile action for the player. How this action works is the player will press and hold the right mouse button to aim and then the release is what actually fires off the projectile in the direction you are aiming. Additionally, the player movement pauses momentarily when you aim to help balance the combat and aid the player in lining up the shot. Further, I added a quick particle system that produces arrows to show the player where they are aiming.

I am actually quite proud of myself for implementing this feature in only an hour or so, and also without any tutorials! I think I am actually getting the hang of the Unity input system pretty well and understood how to handle the press and hold, then release actions pretty seamlessly. For the actual code to fire off the projectile I was actually able to just lift the code I had in Planet Recovery Force for the laser shot and add it into this placeholder projectile prefab. All I had to do was change Vector2.down to Vector3.forward and I was good to go!

This is just a quick update, and excited to keep adding more to this game!