PDA

View Full Version : Picked Normal?



halo
01-09-2005, 07:51 AM
Is there any way to return the normal of the picked surface? This is a long shot. I figure I will probably have to find the picked object, then go back and push and pop names for each triangle and repeat the process.

zed
01-09-2005, 08:25 AM
from finding the triangle u should be able to get the normal from that data ie i assume u have some data format like so
struct tri
{ vertor v[3];
vertor normal;
}
alternatively another method of doing the selection would be to draw all the objects using the normals colors with *0.5+0.5 (everything else diabled eg texture/lights) and then u just need a readpixels to find out the normal

halo
01-09-2005, 08:43 AM
I was asking if there was some built-in method, before I go back through and select individual triangles. You can get the normal simply from the triangle coordinates.