Page 1 of 1

The block's hitbox changes when the block X coordinate changes in lua

Posted: Sun Nov 26, 2023 1:21 pm
by AiriableConditions
If I set the block's x coordinate to anything that's out of the area of the block by about 2 blocks, the hitbox shrinks. If it goes far enough, the x hitbox is disabled entirely. What's weird is that this seemingly only happens with x block coordinates, and not y coordinates.

Here's an example:
v.x = -199488

Re: The block's hitbox changes when the block X coordinate changes in lua

Posted: Sun Nov 26, 2023 6:14 pm
by Emral
Block collision is internally sorted by the game to improve collision check performance. If you want to move a block programmatically, use the block:translate(dx, dy) method

-- moves 1 pixel to the right:
v:translate(1, 0)