getting color value by pixel
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
getting color value by pixel
Is there a way in LOVE to return the color values of a single pixel? I'm trying to set collision between a character and map areas (walls) using a bumpmap where black indicates passable areas and white indicates impassable areas.
Re: getting color value by pixel
Yeah, you have to create an imageData object from your file first:
http://love2d.org/wiki/love.image.newImageData
That comes with a getPixel() method, which does what you want
http://love2d.org/wiki/love.image.newImageData
That comes with a getPixel() method, which does what you want
Re: getting color value by pixel
Fantastic. Thank you
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 8 guests