fixed rotation bug. Old event-based simulation rotation paragraph was not up to date.

This commit is contained in:
John Tramm 2019-12-13 17:20:32 +00:00
parent 768102ad18
commit f01db6d3d3

View file

@ -541,9 +541,7 @@ void process_collision_events()
// If next level is rotated, apply rotation matrix
const auto& m {model::cells[p->coord_[j].cell]->rotation_};
const auto& u {p->coord_[j].u};
p->coord_[j + 1].u.x = m[3]*u.x + m[4]*u.y + m[5]*u.z;
p->coord_[j + 1].u.y = m[6]*u.x + m[7]*u.y + m[8]*u.z;
p->coord_[j + 1].u.z = m[9]*u.x + m[10]*u.y + m[11]*u.z;
p->coord_[j + 1].u = u.rotate(m);
} else {
// Otherwise, copy this level's direction
p->coord_[j+1].u = p->coord_[j].u;