I'm trying to remove the gravity from SKSpriteNode but is not working. Here is my code:
I add add the SKSpriteNode:
let block: SKSpriteNode = self.childNode(withName: "block") as! SKSpriteNode
I add the gravity thru the Scene.sks
I tried all this ways to remove the gravity but none of the worked:
block.physicsBody?.affectedByGravity = false
block.physicsBody?.isDynamic = false
block.physicsBody?.velocity.dy = 0
block.physicsBody?.categoryBitMask = 0
How can I remove the gravity from SKSpriteNode ? any of you knows
I'll really appreciate your help.