Hi all,
I'm trying to create code which manipulates data within a vector. The vector contains floating points which store consecutive 3D values. For example element 1 stores object 1 x coords, element 2 - object 1 y coords, element 3 - object 1 z coords, element 4 object 2 x coords etc.
My problem, is I am trying to update the vector by replacing the values for the 3rd object x,y and z with the second objects, and then putting in new data for the first.
void shuffleArray()
{
int a = 4;
for (int c = 0; c < bodyPos.size()-3; c++) {
bodyPos[a] = bodyPos[c];
a++;
}
}
This however won't work as it is only ending up with the first 3 elements.
Thanks,
Gareth