Files
WickedEngine/scripts/rotate_model.lua
T
2019-03-02 22:02:00 +00:00

18 lines
463 B
Lua

-- This script will load a teapot model with lights and rotate the whole model
backlog_post("---> START SCRIPT: rotate_model.lua")
scene = GetScene()
scene.Clear()
model_entity = LoadModel("../models/teapot.wiscene")
transform_component = scene.Component_GetTransform(model_entity)
runProcess(function()
while true do
transform_component.Rotate(Vector(0, 0.1)) -- rotate around y axis
update()
end
end)
backlog_post("---> END SCRIPT: rotate_model.lua")