hello i need help geting a shooting system in my game
i got the basics with gun and player movement im just not sure hoow to get the bullet to go in the dirction of the gun an anyone help?
i cant upload rn as i am a new user so ill just put the code here
if (isKeyDown(‘z’)){gun.rotation += 20}
if (isKeyDown(‘x’)){gun.rotation -= 20}
if (isKeyJustPressed(“c”)) {bullet.mv=true}
if (bullet.mv===true) {this.x-=20}