summaryrefslogtreecommitdiff
path: root/honey/ecs/collision.lua
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-05-18 22:23:42 -0500
committersanine <sanine.not@pm.me>2023-05-18 22:23:42 -0500
commiteafff1e04eb7f6a63818db035d2c6a277c5c364c (patch)
treec32d7bb4fde9408539d13ce43dc0ff4824765412 /honey/ecs/collision.lua
parent4b2507b2f30d50c8673f33179c2b537ac83da3bf (diff)
visualize collisionsrefactor
Diffstat (limited to 'honey/ecs/collision.lua')
-rw-r--r--honey/ecs/collision.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/honey/ecs/collision.lua b/honey/ecs/collision.lua
index b385e76..54598cb 100644
--- a/honey/ecs/collision.lua
+++ b/honey/ecs/collision.lua
@@ -59,7 +59,7 @@ local function updateGeom(collision)
elseif class == "cylinder" then
ode.GeomCylinderSetParams(geom, collision.radius, collision.length)
elseif class == "ray" then
- GeomRaySetLength(geom, collision.length)
+ ode.GeomRaySetLength(geom, collision.length)
end
end
@@ -121,8 +121,8 @@ local updateTransform = ecs.System("collisionTransform", function(db, dt, p)
local collisions = ode.Collide(geomA, geomB, p.maxPoints or 1)
if #collisions > 0 then
-- get entity ids
- local idA = ode.GetData(geomA)
- local idB = ode.GetData(geomB)
+ local idA = ode.GeomGetData(geomA)
+ local idB = ode.GeomGetData(geomB)
-- run handlers, if any
runCollisionScript(db, idA, idB, collisions)