Tech ENABLE_TRANSFORMATIONS_BY_MATRICES - Fixed translation of volumes in local coordinate system

This commit is contained in:
enricoturri1966 2022-05-12 12:07:27 +02:00
parent fd5816d946
commit 3dbad698df

View File

@ -782,8 +782,11 @@ void Selection::translate(const Vec3d& displacement, TransformationType transfor
else else
assert(false); assert(false);
} }
else else {
transform_volume_relative(v, volume_data, transformation_type, Geometry::translation_transform(displacement)); const Vec3d offset = transformation_type.local() ?
volume_data.get_volume_transform().get_rotation_matrix() * displacement : displacement;
transform_volume_relative(v, volume_data, transformation_type, Geometry::translation_transform(offset));
}
} }
#if !DISABLE_INSTANCES_SYNCH #if !DISABLE_INSTANCES_SYNCH