pxt-arcade icon indicating copy to clipboard operation
pxt-arcade copied to clipboard

Using placeOnTile makes it easy to clip through walls for large sprite

Open riknoll opened this issue 5 years ago • 2 comments
trafficstars

For sprites that are 16x16 or larger, using placeOnTile will sometimes cause your sprite to be placed so that it overlaps with adjacent walls. This causes you to clip though the floor

Here's a game that demonstrates the issue with a 16x16 sprite. Run into the "bad" tile and it should teleport you up top. Roughly 50% of the time you will clip through the floor.

https://makecode.com/_PgJC7T2tR1HM

And here's the same code with a 17x17 sprite which clips 100% of the time:

https://makecode.com/_1su0wLWwJWLk

We should be smarter when placing a sprite on a tile to ensure it isn't colliding with any walls (if possible)

riknoll avatar Feb 19 '20 23:02 riknoll

This bug was reported through the forum here: https://forum.makecode.com/t/sprite-in-continuous-fall/1237/11

riknoll avatar Feb 19 '20 23:02 riknoll

@riknoll I am removing next-release as there are no taker.

abchatra avatar Jul 14 '20 23:07 abchatra