objective c - spritekit collisionBitMask pass through each other -



objective c - spritekit collisionBitMask pass through each other -

i have 2 nodes - rabbit , slab. how can pass through each other, , i'm doing wrong?

static const uint32_t rabbitcategory = 0x1 << 1; static const uint32_t slabcategory = 0x1 << 2; rabbit.physicsbody.categorybitmask = rabbitcategory; rabbit.physicsbody.collisionbitmask = rabbitcategory; slab.physicsbody.categorybitmask = slabcategory; slab.physicsbody.collisionbitmask = slabcategory;

i believe want set collisionbitmask category physics body collide:

rabbit.physicsbody.categorybitmask = rabbitcategory; rabbit.physicsbody.collisionbitmask = slabcategory; slab.physicsbody.categorybitmask = slabcategory; slab.physicsbody.collisionbitmask = rabbitcategory;

objective-c sprite-kit

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -