3

I'm basically painting the world in the native tile mapper and then placing sprite nodes everywhere to act as physics bodies for it. Since tile maps are based on rounded whole number coordinates (x: 1, y: 1) and the scene editor has three decimal places (x: 1.093, 1:026) it makes it hard to line everything up perfectly. To get perfect alingment I have to click on each sprite node, change it's coordinates to a whole number, then move it around with the macs arrow keys. Not too bad but after a while it gets very tedious.

I tried this method: https://spritekitlessons.com/how-to-add-a-physics-body-to-sktilemapnode/

To get physics bodies to auto populate where tiles are but the scaling was way off on the physics bodies. They didn't match the layout of the tile map or were all severely compressed for some reason. Another issue was it took about 15 seconds to load the level, where as my method of manually placing ground sprites lets the level load instantly.

If there's no easy way to automatically put physics bodies over tiles I'll keep doing what I'm doing, but I thought I'd see if anyone knows anything about it.

Thanks.

genericguy25
  • 602
  • 3
  • 16

0 Answers0