I made a program that loads the locations of items on the scene from a file like this:
using (StreamReader sr = new StreamReader(OpenFileDialog1.FileName))
{
String line;
while ((line = sr.ReadLine()) != null)
{
red = line.Split(',');
model = row[0];
x = row[1];
y = row[2];
z = row[3];
elements.Add(Convert.ToInt32(model));
data.Add(new Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z)));
sfepheres.Add(new BoundingSphere(new Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z)), 1f));
}
I also have a list of BoundingSpheres (called spheres) that adds a new bounding sphere for each line from the file. In this program I have one item (a simple box) that moves (it has its world matrix called matrixBox), and other items are static entire time (there is a world matrix that holds those elements called simply world). The problem i that when I move the box, bounding spheres move with it. So how can I bind all BoundingSpheres (except the one corresponding to the box) to the static world matrix so that they stay in their place when the box moves?

BoundingSphereobjects are moving? How are you drawing them to the screen? Can you add the code for that to the question? How does the drawing differ the moving object and the static objects? – Matt Kemp Jul 11 '12 at 13:19worldBox = Matrix.CreateTranslation(new Vector3(0.01f, 0f, 0f))*worldBox;. I know that the other boundingSpheres are moving because when I click the statc item, after a few moves the box stops and when I click a few pixels to the right, it starts moving again – NDraskovic Jul 11 '12 at 13:23