4 Replies
      Latest reply on Dec 8, 2017 3:34 PM by pfortissimo
      pfortissimo Level 1 Level 1 (0 points)

        Getting an "unrecognized selector sent to instance" error dump when executing the GKNoise.remapValues() function according to the developer doc at  https://developer.apple.com/documentation/gameplaykit/gknoise/1823487-remapvalues

         

        Copy and paste the below into a playground to replicate:

         

        
        import GameplayKit
        let selectFrequency = 5.1
        let selectOctaves = 7
        let selectPersistence = 1.1
        let selectLacunarity = 1.2
        let sizeVec = vector_double2(1.0, 1.0)
        let origVec = vector_double2(0.0, 0.0)
        let sampleSizeVec = vector_int2(Int32(100), Int32(100))
        let selectionNoise = GKNoise(GKPerlinNoiseSource(frequency: selectFrequency, octaveCount: selectOctaves, persistence: selectPersistence, lacunarity: selectLacunarity, seed: 5000))
        
        
        selectionNoise.remapValues(toCurveWithControlPoints: [-1.0: -1.0, -0.5: 0.5, 0.5: -0.5, 1.0: 1.0])
        
        let noiseMap = GKNoiseMap(selectionNoise, size: sizeVec, origin: origVec, sampleCount: sampleSizeVec, seamless: false)
        
        

         

        Wondering if anyone else has encountered the issue?