Here is my code:func didBegin(_ contact: SKPhysicsContact) {
print("contact.bodyA.categoryBitMask:::\(contact.bodyA.categoryBitMask)")
print("contact.bodyA.contactTestBitMask:::\(contact.bodyA.contactTestBitMask)")
print("contact.bodyA.isDynamic:::\(contact.bodyA.isDynamic)")
print("contact.bodyB.categoryBitMask:::\(contact.bodyB.categoryBitMask)")
print("contact.bodyB.contactTestBitMask:::\(contact.bodyB.contactTestBitMask)")
print("contact.bodyB.isDynamic:::\(contact.bodyB.isDynamic)")and I got the result:contact.bodyA.categoryBitMask:::1 contact.bodyA.contactTestBitMask:::9 contact.bodyA.isDynamic:::true contact.bodyB.categoryBitMask:::5 contact.bodyB.contactTestBitMask:::8 contact.bodyB.isDynamic:::falseI found the contact nodes are not collected by its categoryBitMask and contactTestBitMask. I mean A's categoryBitMask not match B's contactTestBitMask, but their contact can be detect.Somebody tell me why, and how can I optimize the SKPhysicsContact.
Post
Replies
Boosts
Views
Activity
I have a game scene with about 300 nodes, and 120 draws, and FPS result is about 45 - 55, in iphone 6s, but about 30 in iphoneX.I don't know why, they run the same programme,and the same iOS 13.3 version. Anybody have engage the same issue?