sprite-kitskphysicsbody

Scale a SKPhysicsBody, how?


I'm reasonably sure I've previously seen code somewhere that scales a SKPhysicsBody, but google and the docs aren't helping, making me more confused than normal.

Is there a way to scale a physic's body in SpriteKit?

The docs, here, don't mention anything about it: https://developer.apple.com/reference/spritekit/skphysicsbody


Solution

  • If you assign a physics body to a sprite and scale that sprite, the physics body will scale with it.