Drop to bed function now accounts for instance transformation
This commit is contained in:
parent
3d8c3804fa
commit
0481f33ceb
1 changed files with 2 additions and 1 deletions
|
@ -348,7 +348,8 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
||||||
if (selection.is_single_volume() || selection.is_single_modifier()) {
|
if (selection.is_single_volume() || selection.is_single_modifier()) {
|
||||||
const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin());
|
const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||||
|
|
||||||
Vec3d diff = m_cache.position - Vec3d(0., 0., get_volume_min_z(volume));
|
const Geometry::Transformation& instance_trafo = volume->get_instance_transformation();
|
||||||
|
Vec3d diff = m_cache.position - instance_trafo.get_matrix(true).inverse() * Vec3d(0., 0., get_volume_min_z(volume));
|
||||||
|
|
||||||
change_position_value(0, diff.x());
|
change_position_value(0, diff.x());
|
||||||
change_position_value(1, diff.y());
|
change_position_value(1, diff.y());
|
||||||
|
|
Loading…
Reference in a new issue