This commit is contained in:
Jan Racek
2026-03-29 18:40:52 +02:00
parent 2cd9af28f1
commit fcb25a5388
22 changed files with 1307 additions and 175 deletions

View File

@@ -13,8 +13,12 @@ end
function onInteract(self)
selected = not selected
if selected then
Controls.SetEnabled(false)
Interact.SetEnabled(self, false)
setStatus("Object selected! D-pad to move, Triangle to deselect.")
else
Controls.SetEnabled(true)
Interact.SetEnabled(self, true)
setStatus("Object deselected.")
end
end
@@ -23,7 +27,8 @@ function onButtonPress(self, button)
if not selected then return end
local pos = self.position
local step = 1
local one = FixedPoint.new(1)
local step = one / 64
if button == Input.UP then
Entity.SetPosition(self, Vec3.new(pos.x, pos.y, pos.z + step))
@@ -39,6 +44,8 @@ function onButtonPress(self, button)
Entity.SetPosition(self, Vec3.new(pos.x, pos.y - step, pos.z))
elseif button == Input.TRIANGLE then
selected = false
Controls.SetEnabled(true)
Interact.SetEnabled(self, true)
setStatus("Object deselected.")
elseif button == Input.SQUARE then
local rot = Entity.GetRotationY(self)