- Home /
How do I create a 2d shooting mechanic (Left and Right)?
Hello, I am a beginner unity programming user wondering, how do I make a shooting mechanic for my game? I want the it to shoot left and right depending on the players direction. As well as using the Keycode.L to shoot, I am using the basic Unity 2d Player Movement asset to move my character if that helps any. Thank you to anyone who can help me with this.
Comment
Answer by leSamo · May 06, 2018 at 08:31 PM
You can give the projectile the velocity of transform.forward of your player object. That will make the projectile go in the direction player is facing,