mardi 4 août 2015

How do you ignore a collision (e.g. the ground in a scene) while still responding to others in sprite kit?

From what I understand, you must set up category bit masks such (static const uint32_t chickenCategory = 0x1 << 0;) but when i set up my program, it still registers contact with ground in the didBeginContact method. From what i've found online, you can do this: cow.physicsBody.contactTestBitMask= obstacleCategory | ~groundCategory;

this is supposed to ignore the contact collision detection with the ground category but its not working. Apparently this works with the old Xcode but not the new one (version 6.4).

Aucun commentaire:

Enregistrer un commentaire