Hello, 

i have been using this method to get the cross product of two vectors:

#####

pt1=cmds.pointPosition('locator1')
pt2=cmds.pointPosition('locator2')
pt3=cmds.pointPosition('locator3')

vec1=pm.dt.vector=(pt2[0]-pt1[0],pt2[1]-pt1[1],pt2[2]-pt1[2])
vec2=pm.dt.vector=(pt3[0]-pt1[0],pt3[1]-pt1[1],pt3[2]-pt1[2])

perpenVec=vec1^vec2

####

with the '^' symbol this process works when i tried it at home on maya 2015 in 
python tab of script editor. 

I dont know what has changed but when i tried it at work using maya 2016 in 
script editor it returns this:

# Error: TypeError: file <maya console> line 14: unsupported operand type(s) 
for ^: 'tuple' and 'tuple' # 

i don't think i have done anything different in my new script as it seems to 
match my other one. Can anyone tell me why the cross product operator ^ doesn't 
seem to work here?

thanks alot, 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f119d42e-75bf-44b5-88bf-d39e660e1aed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to