Fixed volumes translation (again)

This commit is contained in:
Enrico Turri 2018-11-23 11:14:32 +01:00
parent 66a08be209
commit bcf7a1f751

View File

@ -1455,7 +1455,7 @@ void GLCanvas3D::Selection::translate(const Vec3d& displacement)
(*m_volumes)[i]->set_instance_offset(m_cache.volumes_data[i].get_instance_position() + displacement);
else if (m_mode == Volume)
{
Vec3d local_displacement = (m_cache.volumes_data[i].get_instance_rotation_matrix() * m_cache.volumes_data[i].get_volume_rotation_matrix()).inverse() * displacement;
Vec3d local_displacement = m_cache.volumes_data[i].get_instance_rotation_matrix().inverse() * displacement;
(*m_volumes)[i]->set_volume_offset(m_cache.volumes_data[i].get_volume_position() + local_displacement);
}
#else