Hello guys, I'm currently working on a 2D space shooter game in C++ using SFML library. What I need to know is how make an object (ex:laser) fire up from object (ex:player) when a user press button??
I'd be very grateful for you guys cuz I'm only stuck on that!!
There is some variable commonly known as velocity. Set the velocity of the missile to be a negative value and draw. What I basically mean is that, create the missile near the player(below), and when updating its position, do so upward by using a negative value.