0

I'm trying to use SKPhysicsBody in a SpriteKit game for what would be my "ground/platform" node.

Even though I'm using:

ground01.physicsBody = SKPhysicsBody(texture: ground01.texture!, size: ground01.size)

It feels as if the limits of the physics body are a little bit lower than they should be.

Is there a way to debug draw the limits of the physics body just to make sure I'm not making any mistakes?

Thanks in advance!

rshimoda
  • 1,137
  • 1
  • 13
  • 24
  • 2
    Set the view's `showsPhysics` property to `true` https://developer.apple.com/documentation/spritekit/skview/1520389-showsphysics – bg2b Feb 25 '20 at 02:25
  • 1
    BTW, physics bodies from textures are broken in certain circumstances in iOS 13. If you're running into a problem where the body is incorrect, see https://stackoverflow.com/questions/59961842/physicsbody-could-not-create-physics-body/60016825#60016825 – bg2b Feb 25 '20 at 02:28

0 Answers0