Big ol refactor of scripts

This commit is contained in:
2026-04-21 23:27:53 -05:00
parent 17c924f040
commit 28ddb48896
90 changed files with 2670 additions and 4013 deletions
+4 -2
View File
@@ -9,6 +9,7 @@ module('entitycamera')
local phys
local updateSub
local SPEED = 4.0
local mat
function entityInit()
local pos = entityPositionAdd(ENTITY_ID)
@@ -22,8 +23,7 @@ function entityInit()
local mesh = entityMeshAdd(ENTITY_ID)
mesh:generateCapsule(0.3, 0.9)
local mat = entityMaterialAdd(ENTITY_ID)
mat.color = colorBlue()
mat = entityMaterialAdd(ENTITY_ID)
updateSub = eventSubscribe(SCENE_EVENT_UPDATE, onUpdate)
end
@@ -32,6 +32,8 @@ function onUpdate()
local moveX = inputAxis(INPUT_ACTION_LEFT, INPUT_ACTION_RIGHT)
local moveZ = inputAxis(INPUT_ACTION_DOWN, INPUT_ACTION_UP)
mat.color = colorRainbow()
local cam = entityCameraGetCurrent()
local fwd = cam:getForward()
local right = cam:getRight()