bump.lua icon indicating copy to clipboard operation
bump.lua copied to clipboard

Can't query my object.

Open stzengh opened this issue 9 years ago • 3 comments

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?

stzengh avatar May 15 '17 12:05 stzengh

Have you tried drawing the object and segment? Are you sure they must intersect?

kikito avatar May 15 '17 13:05 kikito

From the coordinate the A object is in the query rect.

stzengh avatar May 15 '17 13:05 stzengh

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.

kikito avatar May 15 '17 14:05 kikito