Solsma Dev
Solsma Dev

Reputation: 481

Make a certain sprite ignore SKPhysicsBody

I am having an issue making a sprite ignore the effects of a SKPhysicsBody placed as a ground platform in an iOS project. I have only one sprite that I would like to "follow the rules" of the SKPhysicsBody and for all other sprites to "pass through". I have searched for a way to do this, but to no avail. Any suggestions?

Upvotes: 0

Views: 193

Answers (1)

rockstarr
rockstarr

Reputation: 296

for any physics body that you want to pass through set its collisionBitMask to 0 that means that it won't collide with anything, make sure you don't set the collisionBitMask of the ground to the type of sprite you want them to pass through,

Upvotes: 1

Related Questions