It should just work. According to this quick test:

import maya.api.OpenMaya as om
import math

axis = om.MVector.kXaxis
vec = om.MVector(0, 1, 0)

result1 = vec.rotateBy(axis, math.radians(90))
result2 = vec.rotateBy(axis, math.radians(-90))

print result1
# (0, 2.22045e-016, 1)
print result2
# (0, 2.22045e-016, -1)

Do you have some more info about your variables/script that might help us 
to identify the problem you're having?

On Tuesday, September 13, 2016 at 1:02:45 AM UTC+2, [email protected] 
wrote:
>
> Hello, 
>   
> i am using the 'rotate.By' method from the MVector class. all i want to 
> know is how can i make the angle that is used in the calculation become 
> negative. so the vector that is returned after it is rotated by the given 
> axis is in the opposite direction eg 
>
> rot_1 = rot1.rotateBy(rotate_by_axis, math.radians(angle[3])) 
>
> rot_1 = rot1.rotateBy(rotate_by_axis, math.radians(-angle[3])) 
>
> the second one has a minus before the angle. I assumed this would rotate 
> the other way but just generates the same vector. Does anyone know how to 
> rotate in the opposite direction? 
>
> 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/43121701-9990-4e3d-945a-8c209d05f395%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to