1
0
mirror of https://github.com/teverse/teverse synced 2025-08-25 07:34:46 +02:00

Compare commits

..

No commits in common. "46fda8fe6555de4c4677e55a968ef878aa994882" and "64c7894befdd2eb0894949bc3bd214277adbdc69" have entirely different histories.

2 changed files with 3 additions and 10 deletions

View File

@ -186,27 +186,20 @@ 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))
scaleBy = vector3(math.abs(scaleBy.x), math.abs(scaleBy.y), math.abs(scaleBy.z)):normal()
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
elseif object.name ~= "_bounding" then
else
-- single click
local currentTime = os.time()
lastClick = currentTime