Post

Replies

Boosts

Views

Activity

Reply to SKPhysicsContact detect the contact not expecting
body A category = 0001, contact = 1001body B category = 0101, contact = 1000(Body A category) bitwise-& (body B contact) = 0000, would not flag collision(Body B category) bitwise-& (body A contact) = 0001, flags collisionAccording to the documentation, if either comparison gives a nonzero result, you'll get a collision notification.https://developer.apple.com/documentation/spritekit/skphysicsbody/1519781-contacttestbitmaskIf you don't want that notification, you have to make sure that body B's category mask does not overlap with body A's contact mask.
Dec ’19
Reply to SpriteKit iOS 13 Swift 4 textures nil
We don't use sks files but do everything programmatically, so I don't know what might be happening under the hood there. Unfortunately I only have two physical devices, one with iOS 12.4 and one now with 13.3. I can't say for sure whether the issue has to do with the device's iOS version or with the Xcode version and libraries instead, but our code has two paths when making a physics body. One for iOS 13.0 and 13.1 where it uses a convex hull, and one for everything else where it uses the texture but not from an atlas. Upgrading from 13.2 to 13.3 didn't break it, so I assumed 13.3 was at least as working as well as 13.2 when it came to making physics bodies. I also assumed a 13.1 device would still be broken, but don't have one to test. Simulator testing never showed a problem, but it wasn't practical in our case.
Dec ’19
Reply to SpriteKit iOS 13 Swift 4 textures nil
As discussed in various stackoverflow threads, physics bodies from textures was completely broken in 13.0 and 13.1. It was partially fixed in 13.2 in that it works for textures that are not in atlases. I haven't checked 13.3 specifically yet since we worked around the issue by adding duplicate not-in-atlas versions of textures just for making physics bodies (and by falling back to a convex-hull approach when running under 13.0 and 13.1). As a suggestion to try to get something working, see if you can remove anything that needs a texture-based physics body from an altas.
Dec ’19