Get RGB values from a raycast?

Hi all

Just curious but is it possible to get the RGB value of a point on a textured polygon? I can’t see any mention of this in the API but its been incomplete before.

I ask as I was deleting a load of stuff and came across some old 3D Gamestudio files. One was a mini stealth game that did the above. The player cast a ray downward and if the pixel was a dark value you were less visible to enemy characters.

If raycasts cannot do this, what other way is possible?

Cheers

Paul

You don’t use raycasts, I beleive you want a GLSL shader but i can’t remember what part. Ask Martinsh

Raycasts can give you UV values, which, combined with checking the texture with the bge.texture module, should give you the color of the texture. If you multiply this by the object color (if you’re using Multiply blend mode), then you can get the answer, I think.