You need to apply the anchor point to the physics body, it has no understanding of what sprite is, it is just another piece of information sprite uses, so use the following calculation to determine where the center of the sprite should be, and apply that to the physics body so that it may shift:
let centerPoint = CGPointMake(sprite.size.width / 2 - (sprite.size.width * sprite.anchorPoint.x), sprite.size.height / 2 - (sprite.size.height * sprite.anchorPoint.y))
sprite.physicsBody = SKPhysicsBody(rectangleOfSize: sprite.size, center: centerPoint)
Swift 3+:
let centerPoint = CGPoint(x:sprite.size.width / 2 - (sprite.size.width * sprite.anchorPoint.x), y:sprite.size.height / 2 - (sprite.size.height * sprite.anchorPoint.y))
sprite.physicsBody = SKPhysicsBody(rectangleOf: sprite.size, center: centerPoint)
Less text:
let centerPoint = CGPoint(x:sprite.size.width * (0.5 - sprite.anchorPoint.x), y:sprite.size.height *(0.5 - sprite.anchorPoint.y))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…