Moved collision handling to Lua.