first i check is space pressed if(fire) { //MessageBox(NULL,"Fire","",0); VecStruct vs; vs.Dir = rRotToDir; vs.FPos = FinalPos; Vs.push_back(vs); fire = false; } then here loop on vector size, the trouble is each box spawns at the last distance , so i am stuck with this time thing , like how would you reset it without messing anything up, i know the problem , i need to find how much gTimeDela is incrementing so i can start each box from 0 and increment it, but i dont know how atm for(int i = 0; i \< Vs.size(); i++) { D3DXMatrixTranslation(&Vs[i].Pos,Vs[i].Dir.x*gTimeDelta*5.5f, Vs[i].Dir.y*gTimeDelta*5.5f, Vs[i].Dir.z*gTimeDelta*5.5f); d3ddev->SetTransform(D3DTS_WORLD,&Vs[i].Pos); Box->DrawSubset(0); } heres a video of what i mean http://www.youtube.com/watch?v=O30srrLn8IY [code]

then here loop on vector size, the trouble is each box spawns at the last distance , so i am stuck with this time thing , like how would you reset it without messing anything up, i know the problem , i need to find how much gTimeDela is incrementing so i can start each box from 0 and increment it, but i dont know how atm

Make a struct for your particle that contains a position and velocity. When a particle is fired, initialize its position to position of the ship's guns. Every frame, loop over the particles and update their positions, by adding their velocity multiplied by the time taken to render the last frame.

Anddos
—
2010-05-18T18:37:08Z —
#3

ive got that sorted now what i want next is a ray to move with the bullet in the pushed back drection but when i fire say in the oposite direction it says intersected , do you know why?