Swift Sprite Collision. Objects passing Through walls
<p>I'm making a simple game(using Swift &amp; SpriteKit), where I have a circle that can be dragged around. but the circle is not allowed to go through walls.</p>

<p>My collision BitMask works perfectly, but when I drag fast enough, the circle ends up going through the walls.</p>

<p>The Initialisation of the Player Sprite goes Like this:</p>

<pre><code>func initPlayerSprite(){
        let playerTexture = SKTexture(imageNamed: "player.png")
        let originX = CGRectGetMidX(self.frame)
        let originY = CGRectGetMidY(self.frame)
        player = SKSpriteNode(texture: playerTexture, size: CGSize(width: 26, height: 26))

        player.position = CGPoint(x: originX , y: originY)

        player.physicsBody = SKPhysicsBody(circleOfRadius: playerTexture.size().height/2)
        player.physicsBody!.dynamic = true
        player.physicsBody?.allowsRotation = false

        player.physicsBody!.categoryBitMask = ColliderType.Player.rawValue
        player.physicsBody!.contactTestBitMask = ColliderType.Floor.rawValue + ColliderType.Gap.rawValue
        player.physicsBody!.collisionBitMask = ColliderType.Wall.rawValue + ColliderType.Floor.rawValue

        self.addChild(player)
    }
</code></pre>

<p>My code for moving the Sprite goes like this:</p>

<pre><code>override func touchesMoved(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?){

        var nodeTouched = SKNode()

        for touch: AnyObject in touches {
            let location = touch.locationInNode(self)
            let dx = -player.position.x + location.x
            let dy = -player.position.y + location.y
            let movePlayer = SKAction.moveBy(CGVector(dx: dx, dy: dy), duration: 0.02)

        }
}
</code></pre>

<p>Any Idea how to make sure the collision detection work even at high velocities?</p>