Giving SKTileMap Nodes a Physics Body

3,076 views · Published 16 October 2017 · 7:53 · Indexed 28 October 2026

Channel: cartoonsmart · 2017 · Education

Watch on YouTube

Find more tutorials at CartoonSmart.com and be sure to download our Apple TV app at bit.ly/cartoonsmart

Learn how to give SKTileMapNodes a physics body definition using Swift. We'll do this by setting up an SKTileMapNode in the .sks file, then replacing the tiles with SKSpriteNodes that can have all the usual properties of an SKSpriteNode, include a physics body with Alpha channel. I'll also point out where to put in a subclass of SKSpriteNode in case you want to get even fancier and use custom properties.

More from this channel