Normal and location of face under mouse

I’m working on a script, and i need to find the face normal and location of a ray cast from the current view through the mouse.
Is there a easy way to do this?
if not, what is the hard way?

check the code in sculptmesh which does that or I think there were some nice helper functions for raycasting addded to the python api for 2.4


i’ll look into the new python api.
I’m currently disecting the sculptmesh script i have, but it looks like the section i want is not commented verry well.

I have better documented the function a bit locally but haven’t uploaded it yet, (don’t know where I put my comments offhand, but are on my drive somewhere)

I can post the better documented version if you like…


that would be great! thanks. i’ll post my script when it’s done. (well, i’m not sure any python script is ever DONE, but when it basicly works…)

raycasting ? where ?