Hello friends, 

i have a piece of code here in python which gives me the 2d viewpoint coords of 
the cursor whenever i click the mouse:

########################################

import maya.cmds as cmds

ctx = 'myCtx'
def onPress():
    print cmds.draggerContext(ctx, query=True, anchorPoint=True)
if cmds.draggerContext(ctx, exists=True):
    cmds.deleteUI(ctx)
cmds.draggerContext(ctx, pressCommand=onPress, name=ctx, cursor='crossHair')
cmds.setToolTo(ctx)

#########################################

What i need is to cast a ray whenever i click, coming from the viewpoint of the 
camera and using the 2d coordinates generated by this script to check for the 
intersection point on a poly mesh.

Then i just want it to return the 3d xyz coords of that intersection point

im pretty stuck with this. But im sure it can't be to extensive. I anyone can 
help i would be super happpyyyyyy!!!

thanks, 
Sam

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/758864e0-0946-4126-939a-c1ba3bc21a48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to