playdate.graphics.sprite:checkCollisions(x, y) ignoring self:setCenter(1,1)?

The documentation says that:

playdate.graphics.sprite:checkCollisions(point)

"Returns the same values as moveWithCollisions() but does not actually move the sprite."

But that doesn't seem to be true.

I have a sprite with self:setCenter(1,1)
When I use 'moveWithCollisions()' it works as expected, and the first two returned values equal the position of the sprite's bottom right corner.

But when I change to 'checkCollisions()', the first two returned values are the position of the top left corner of the sprite.

I have to add the sprite's width and height to them before I move the sprite to the new position.

EDIT: I guess it's wrong to say that it ignores setCenter(), because the collision detection works the same. It's just the returned values that don't take it into account.

I've filed this, looks like a pretty easy fix. :crossed_fingers:

Thanks for catching that!

I believe I just bumped into this too.

image

The sprite above has a center of (0,0) and the sprite below has (0, 1) - the checkCollisions function says they collide.

EDIT: I take that back, looks like I was calling checkCollisions wrong. It appears to be fine now.