ObjectiveCsam
ObjectiveCsam

Reputation: 204

How to use new per pixel SkPhysics Bodies in Sprite kit

Withe the release of iOS 8 apple also released the new swift. Buy they also released some updates to sprite kit. One of them being per pixel physics bodies. I was trying to find how to implement this per pixel physics bodies in xcode beta and after searching through the SKphysicBody class i couldn't fine anything. Just wondering if this will be released later on or if i have missed something.Also if this feature is only available in swift or if it available in both swift and objective C.

Upvotes: 2

Views: 547

Answers (1)

WebOrCode
WebOrCode

Reputation: 7302

For per pixel physics bodies

SWIFT

init(texture texture: SKTexture!, size size: CGSize) -> SKPhysicsBody

OBJECTIVE-C

+ (SKPhysicsBody *)bodyWithTexture:(SKTexture *)texture size:(CGSize)size

Upvotes: 1

Related Questions