I need to get the color of a pixel/point for my game in Swift. So I tried to find a function that inputs a CGPoint and returns a Color, everything that I have found so far has only returned (0,0,0,0). I think that this is because I am doing this in my game scene class(which is an SKScene), and the scene is only being loaded by a view controller. Any Solutions?
(If there is a better way to check if a sprite is touching a color that would work as well)
Thanks in advance.
Add the below method:
You can get the color of the point you want with