Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
PhysicsBody: Could not create physics body.
Facing the same issue and it might be related to the use of Texture Atlases.The following is NOT working with the above mentioned error:let textureAtlas = SKTextureAtlas(named: "some-atlas")
let bodyTexture = textureAtlas.textureNamed("some-atlas-image")
self.physicsBody = SKPhysicsBody(texture: bodyTexture, size: self.size)But this is working:let sprite = SKSpriteNode(imageNamed: "some-asset")
self.physicsBody = SKPhysicsBody(texture: sprite.texture!, size: self.size)I hope it is helpful information as I have no clue what the exact difference is between these code fragments. Both result in a Texture object.