2D Top Down Shooter Question
When the player clicks the mouse button to shoot, it gets the xy co-ords of the player and xy xo-ords of the place clicked on the screen. Finds the gradient of that line, add 1 to x and m to gradient every frame. How can i set a speed of the bullet, lol they move lyk turtles atm, i would lyk almost real tym bullet speed, but i need them to go through each point so i can check if it hits a tree or something.
Ne hints from previous experience?
Cheers, Nick
You don't need to move the bullets 1 px every frame. You can move the bullets 1 px at a time, ten times per frame
for( ctr=0; ctr < 10 ; ctr++ ) //check collision //move n pixels
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement