problem accessing fixture userdata from rayCast & BB
Posted: Sun May 20, 2012 2:23 am
Hi All
I seem to be getting a function back from fixture:getUserData() in the callbacks of
world:queryBoundingBox and world:rayCast - not the table I expect.
(the only userData set anywhere in my code is a table, no functions)
for the fixtures in beginContact, endContact etc it's working as expected
i.e.
function beginContact(a, b, coll)
a:getUserData(), b:getUserData() -- works fine.
Some code:
function bbCallback(fixt)
local t = fixt:getUserData()
print('userdata was '..type(t)..' huh?') -- getting function should be table
function rayCallback(fixt)
print('type fixt '..type(fixt))
world:queryBoundingBox(mx, my, mx, my, bbCallback)
world:rayCast( mx, my, mx+20, my, rayCallback )
Like I mentioned, the collision fixtures have userdata ok.
Can anybody confirm if this is bug in love (0.8), or see a problem in my code?
Thanks
I seem to be getting a function back from fixture:getUserData() in the callbacks of
world:queryBoundingBox and world:rayCast - not the table I expect.
(the only userData set anywhere in my code is a table, no functions)
for the fixtures in beginContact, endContact etc it's working as expected
i.e.
function beginContact(a, b, coll)
a:getUserData(), b:getUserData() -- works fine.
Some code:
function bbCallback(fixt)
local t = fixt:getUserData()
print('userdata was '..type(t)..' huh?') -- getting function should be table
function rayCallback(fixt)
print('type fixt '..type(fixt))
world:queryBoundingBox(mx, my, mx, my, bbCallback)
world:rayCast( mx, my, mx+20, my, rayCallback )
Like I mentioned, the collision fixtures have userdata ok.
Can anybody confirm if this is bug in love (0.8), or see a problem in my code?
Thanks