Shooting Mechanic Implementation


Hey all, my name is Joshua Haberzettl and I'm an engineer here at Precipice Games. For this week's sprint I worked on getting our character to shoot projectiles. I started off by expanding from the logic in our character controller script, and used Unity's new input system in order to rotate the player character with the arrow keys, independent of movement. Then, I made it so that a bullet projectile is spawned from the player's "gun" and propelled forward in whatever direction they were aiming, of course making sure to get rid of the bullet once it collides with something or just goes off on its own and gets too far from the player. I also left some of the variables such as bullet velocity and fire rate open for the design team to play around with so they can get it to feel just right, as well as being able to be adjusted mid-run via items in the future!

Currently, the player movement does not rotate the player character because it messes with the roatation for the shooting, but later down the line we plan to get them to work in tandem, with shooting taking rotation priority. Additionally, there's a little bug with the firerate that makes it vary a bit at random, but I think I know now what was causing it, so it should be a simple fix.

For next week, we're making the moves to finish a stable prototype build, and for this last stretch I will be working on an inventory system to store items you'd get throughout a run.

Get Whispering Abyss (2022)

Leave a comment

Log in with itch.io to leave a comment.