SpriteKit - No Contact when Dynamic

107 views Asked by At

My problem is when me hero make contact with an obstacle he rotates and gets affected by that contact, if i set dynamic = false, contact stops getting detected. here is what my hero looks like:

    hero.physicsBody = SKPhysicsBody(rectangleOfSize: hero.size)
    hero.physicsBody?.categoryBitMask = heroGroup
    hero.physicsBody?.contactTestBitMask = obstacleGroup
0

There are 0 answers