1
0
mirror of https://github.com/teverse/teverse synced 2025-08-25 15:44: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
end end
print(translateBy, offsetBy)
if didMove then if didMove then
--print(dist, translateBy) --print(dist, translateBy)
for _,v in pairs(selection.selection) do for _,v in pairs(selection.selection) do
if type(v.position) == "vector3" and type(v.size) == "vector3" then if type(v.position) == "vector3" and type(v.size) == "vector3" then
local scaleBy = (v.rotation * translateBy) 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 if scaleBy.x < 0.01 then
scaleBy.x = 0 scaleBy.x = 0
end 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 if translateBy[axis] < 0 then
scaleBy = -scaleBy scaleBy = -scaleBy
end end
v.position = v.position - (offsetBy / 2) v.position = v.position - (offsetBy / 2)
v.size = v.size + scaleBy v.size = v.size + scaleBy
end end

View File

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