summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index 6d997cb..2542910 100644
--- a/main.lua
+++ b/main.lua
@@ -11,7 +11,7 @@ local systems = honey.ecs.SystemDb(db)
local space = honey.ode.HashSpaceCreate(honey.ode.Space0)
systems:addSystems(honey.ecs.node.system)
-systems:addSystems(honey.ecs.render.system)
+systems:addSystems(honey.ecs.render.system, {drawGeoms=true})
systems:addSystems(honey.ecs.script.system)
systems:addSystems(honey.ecs.collision.system, { space=space })
@@ -20,7 +20,7 @@ db:createEntityWithComponents{
node = {
matrix = Mat4()
:identity()
- :translate(Vec3{0,0,10}),
+ :translate(Vec3{0,0,4}),
},
camera = {
projection = Mat4()
@@ -66,6 +66,15 @@ db:createEntityWithComponents{
},
shader = { vertex="vertex.glsl", fragment="fragment.glsl" },
},
+ collision = {
+ class = "capsule",
+ radius = 1,
+ length = 2,
+ lx = 2,
+ ly = 2,
+ lz = 2,
+ },
+ script = { script = "scripts.rotate" },
}
honey.loop(function(dt)