rogueviz::flocking:: fixed a bug in inital setup occuring sometimes

This commit is contained in:
Zeno Rogue 2021-04-07 14:49:06 +02:00
parent 0bfeca4256
commit ab3bb1b378
1 changed files with 1 additions and 0 deletions

View File

@ -502,6 +502,7 @@ namespace flocking {
vertexdata& vd = vdata[i];
// set initial base and at to random cell and random position there
createViz(i, v[hrand(isize(v))], Id);
vd.m->pat.T = Id;
rotate_object(vd.m->pat.T, vd.m->ori, random_spin());
apply_parallel_transport(vd.m->pat.T, vd.m->ori, xtangent(hrandf() / 2));
rotate_object(vd.m->pat.T, vd.m->ori, random_spin());