diff options
author | sanine <sanine.not@pm.me> | 2023-05-16 22:51:17 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-05-16 22:51:17 -0500 |
commit | 4b2507b2f30d50c8673f33179c2b537ac83da3bf (patch) | |
tree | f30fef03ada16c56e638f7955b1d01de676fda13 /main.lua | |
parent | fae263bc315f1c44cbcf399f58c92e23f0968747 (diff) |
add basic collision geom visualizations
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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) |