Ignore:
Timestamp:
08/19/16 11:35:59 (8 years ago)
Author:
oriona
Message:

Movement of forams in z axis restricted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • experiments/frams/foraminifera/data/scripts/foraminifera.expdef

    r587 r588  
    329329        var cr = Populations[0].add(geno);
    330330        cr.name = "Initial creature" + species + "_" + iter;
    331         placeCreatureRandomly(cr, 0, 0);
     331        placeRandomlyNotColliding(cr);
    332332        cr.energy = start_energy;
    333333        setGenotype({"opt" : "birth", "cr" : cr, "gen" : ploid, "species" : species, "energy0" : cr.energy, "genes" : species_genes[species], "parentsuids" : ["c0"]});
     
    410410                placeCreatureRandomly(cr, 0, 0);
    411411                if (!cr.boundingBoxCollisions(0))
     412                {
     413                        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)
    412414                        return cr;
     415                }
    413416        }
    414417
     
    539542                if (!eating && cr.data->lifeparams->hibernated == 0)
    540543                {
     544                        mindistvec.z = 0;
    541545                        mindistvec.normalize();
    542546                        mindistvec.scale(-1*movePerStep);
     
    570574function foramMove(cr)
    571575{
    572         //adjustment in z axis
    573         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)
    574 
    575576        //are there any nutrients in zone 1 or 2?
    576577        {
Note: See TracChangeset for help on using the changeset viewer.