Compare commits

...

2 Commits

Author SHA1 Message Date
Jay 46fda8fe65 fix scale tool bug 2019-12-31 23:38:29 +00:00
Jay c4803464b7 fix hierarchy bug 2019-12-31 21:52:45 +00:00
2 changed files with 10 additions and 3 deletions

View File

@ -186,20 +186,27 @@ return {
end
end
print(translateBy, offsetBy)
if didMove then
--print(dist, translateBy)
for _,v in pairs(selection.selection) do
if type(v.position) == "vector3" and type(v.size) == "vector3" then
local scaleBy = (v.rotation * translateBy)
scaleBy = vector3(math.abs(scaleBy.x), math.abs(scaleBy.y), math.abs(scaleBy.z)):normal()
scaleBy = vector3(math.abs(scaleBy.x), math.abs(scaleBy.y), math.abs(scaleBy.z))
if scaleBy.x < 0.01 then
scaleBy.x = 0
end
if scaleBy.y < 0.01 then
scaleBy.y = 0
end
if scaleBy.z < 0.01 then
scaleBy.z = 0
end
if translateBy[axis] < 0 then
scaleBy = -scaleBy
end
v.position = v.position - (offsetBy / 2)
v.size = v.size + scaleBy
end

View File

@ -152,7 +152,7 @@ local function createHierarchyButton(object, guiParent)
controller.scrollView.canvasSize =
guiCoord(1, 0, 0, updatePositions())
end
else
elseif object.name ~= "_bounding" then
-- single click
local currentTime = os.time()
lastClick = currentTime