bump.lua
bump.lua copied to clipboard
Can't query my object.
Hi
Here is my test code:
local world = bump.newWorld(64) local A = {name="A"}
-- insert both rectangles into bump world:add(A, 0, 0, 10, 10) -- x,y, width, height
local items, len = world:querySegment( -1000, -1000, 1000, 1200, nil )
print(len) -- len is zero
Is bug?
Have you tried drawing the object and segment? Are you sure they must intersect?
From the coordinate the A object is in the query rect.
I'm sorry, but I think you are wrong. Try drawing the rectangle (0,0,10,10) and the segment (-1000,-1000,1000,1200). They don't intersect, by a significant margin.