61
Graphics / Re: Spawning bullets
« on: May 02, 2012, 10:45:57 am »
I've never done something like this and might be wrong, but for me the most practical way would be to create a bullet object upon firing which has speed and angle (or a vector) attributes (given it is 2D), and store it into some container. You simply go through the whole container each time and do the movement, if the bullet hits something the instance gets destroyed and removed from the container.
That is, of course, only if you need the bullet to be visible, otherwise you simply calculate the place of impact and show the animation/whatever there.
P.S.: I'm a Beginner, so idk.
That is, of course, only if you need the bullet to be visible, otherwise you simply calculate the place of impact and show the animation/whatever there.
P.S.: I'm a Beginner, so idk.