Index: /experiments/frams/foraminifera/data/scripts/foraminifera.expdef
===================================================================
--- /experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 637)
+++ /experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 638)
@@ -200,10 +200,10 @@
 			{
 				// [x,y,energy]
-				cr.move(g.data->genes[0] - cr.center_x, g.data->genes[1] - cr.center_y, 0);
+				cr.move(g.data->genes[0] - cr.bboxCenter.x, g.data->genes[1] - cr.bboxCenter.y, 0);
 				cr.energy = g.data->genes[2];
 			}
 			else
 			{
-				cr.move(Math.rnd01 * World.wrldsiz - cr.center_x, Math.rnd01 * World.wrldsiz - cr.center_y, 0);
+				cr.move(Math.rnd01 * World.wrldsiz - cr.bboxCenter.x, Math.rnd01 * World.wrldsiz - cr.bboxCenter.y, 0);
 			}
 		}
@@ -224,5 +224,5 @@
 
 	for(var cr in Populations[1])
-		tmpvec.add([cr.center_x, cr.center_y, cr.energy]);
+		tmpvec.add([cr.bboxCenter.x, cr.bboxCenter.y, cr.energy]);
 
 	ExpState.nutrient = tmpvec;
@@ -400,5 +400,5 @@
 		cr.data->reticulopodiacreature = ret;
 		ret.getMechPart(0).orient.set(cr.getMechPart(0).orient);
-		ret.moveAbs(cr.center_x-radius, cr.center_y-radius, cr.center_z-radius);
+		ret.locationSetBboxLow(cr.bboxCenter.x-radius, cr.bboxCenter.y-radius, cr.bboxCenter.z-radius);
 }
 
@@ -421,5 +421,5 @@
 		if (!cr.boundingBoxCollisions(0))
 		{
-			cr.moveAbs(cr.pos_x, cr.pos_y, -cr.getPart(cr.numparts-1).sx); //place slightly under the bottom surface ("z" value depends on the size of the last=largest chamber)
+			cr.locationSetBboxLow(cr.bboxLow.x, cr.bboxLow.y, -cr.getPart(cr.numparts-1).sx); //place slightly under the bottom surface ("z" value depends on the size of the last=largest chamber)
 			return cr;
 		}
@@ -463,5 +463,5 @@
 
 		setGenotype({"cr" : cr2, "parent_genes" : cr.data->genes, "parent_lifeparams" : cr.data->lifeparams, "opt" : "growth", "energy0" : cr.energy0});
-		cr2.moveAbs(cr.pos_x, cr.pos_y,cr.pos_z);
+		cr2.locationSetBboxLow(cr.bboxLow.x, cr.bboxLow.y,cr.bboxLow.z);
 		setForamMeta(cr2);
 
@@ -516,5 +516,5 @@
 function stepToNearest(cr)
 {
-	var p = XYZ.new(cr.center_x, cr.center_y, cr.center_z);
+	var p = XYZ.new(cr.bboxCenter.x, cr.bboxCenter.y, cr.bboxCenter.z);
 	var n = cr.signals.receiveSet("nutrient", getZoneRange(cr,2));
 
@@ -532,5 +532,5 @@
 		for (i = 0; i < n.size; i++)
 		{
-			mp = XYZ.new(n[i].value.center_x, n[i].value.center_y, n[i].value.center_z);
+			mp = XYZ.new(n[i].value.bboxCenter.x, n[i].value.bboxCenter.y, n[i].value.bboxCenter.z);
 			distvec.set(mp);
 			distvec.sub(p);
@@ -597,11 +597,11 @@
 	//Prevents forams from crossing the world border. In the case of touching the border with the reticulopodia direction of the movement should be changed. 
 	var change_direction = 0;
-	var new_x = fence(cr.center_x, getZoneRange(cr, 1));
-	var new_y = fence(cr.center_y, getZoneRange(cr, 1));
-
-	if ((new_x != cr.center_x) || (new_y != cr.center_y) || (cr.data->lifeparams->dir_counter >= int(secToSimSteps(ExpProperties.dir_change_sec))))
+	var new_x = fence(cr.bboxCenter.x, getZoneRange(cr, 1));
+	var new_y = fence(cr.bboxCenter.y, getZoneRange(cr, 1));
+
+	if ((new_x != cr.bboxCenter.x) || (new_y != cr.bboxCenter.y) || (cr.data->lifeparams->dir_counter >= int(secToSimSteps(ExpProperties.dir_change_sec))))
 	{
 		change_direction = 1;
-		cr.moveAbs(new_x-cr.size_x/2, new_y-cr.size_y/2, -cr.getPart(cr.numparts-1).sx);//place slightly under the bottom surface ("z" value depends on the size of the last=largest chamber)
+		cr.locationSetBboxLow(new_x-cr.bboxSize.x/2, new_y-cr.bboxSize.y/2, -cr.getPart(cr.numparts-1).sx);//place slightly under the bottom surface ("z" value depends on the size of the last=largest chamber)
 	}
 
@@ -631,5 +631,5 @@
 	if (visualization(cr))
 	{
-		cr.data->reticulopodiacreature.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
+		cr.data->reticulopodiacreature.locationSetBboxLow(cr.bboxCenter.x-getZoneRange(cr,1), cr.bboxCenter.y-getZoneRange(cr,1), cr.bboxCenter.z-getZoneRange(cr,1));
 		cr.data->reticulopodiacreature.drive = cr.drive;
 	}
@@ -779,5 +779,5 @@
 function onNutrientsStep(cr)
 {
-	cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, 0.5);
+	cr.locationSetBboxLow(cr.bboxLow.x % World.wrldsiz, cr.bboxLow.y % World.wrldsiz, 0.5);
 }
 
@@ -800,5 +800,5 @@
 		var nut = Populations[2].add("//0\nm:Vstyle=nutrient_visual\np:sh=2,sx="+nutsize+",sy="+nutsize+",sz="+nutsize+",ry=1.5,vr=0.0,1.0,0.0");
 		cr.data->reticulopodiacreature = nut;
-		nut.moveAbs( cr.pos_x+cr.size_x/2-nut.size_x/2,  cr.pos_y+cr.size_y/2-nut.size_y/2, -nutsize); 
+		nut.locationSetBboxLow( cr.bboxLow.x+cr.bboxSize.x/2-nut.bboxSize.x/2,  cr.bboxLow.y+cr.bboxSize.y/2-nut.bboxSize.y/2, -nutsize); 
 	}
 }
