It was mentioned a few times in the forum about a technique of casting a ray to read a pixel from a texture.
I wanted to try this old trick to simulate some rudimentary lighting by picking the static lightmap below an object and change its light intensity accordingly.
Another use case would be to get pixel perfect collisions on sprites (check if alpha > 0).
I couldn’t find any complete example in the forum so here is mine:
Any feedback is welcome.