[ODE] Lua binding for ODE
Daniel Tralamazza
tralamazza at gmail.com
Fri Jul 8 01:28:59 MST 2005
Hi there,
I just finished a Lua binding for ODE (with collision callback in
lua also :)).
If anyone it's interested maybe I can submit it to contrib (or I just
send the sources) ?
best regards
Daniel
sample lua code:
w = dWorldCreate()
dWorldSetCFM(w, 0.00001)
dWorldSetGravity(w, 0, 0, -0.5)
print("CFM=" .. dWorldGetCFM(w))
hspace = dHashSpaceCreate(nil)
dCreatePlane(hspace, 0, 0, 1, 0)
contacts = dJointGroupCreate(0)
-- sim loop
while (true) do
lua_dSpaceCollide(hspace, nil, "myCallback")
dWorldQuickStep(w, 0.05)
dJointGroupEmpty(contacts)
end
dJointGroupDestroy(contacts)
dSpaceDestroy(hspace)
dWorldDestroy(w)
More information about the ODE
mailing list