How can I rotate Vector/Point with python? Could you help me guys? Here is screenshot:

enter image description here

On the left - normalized vectors. I need to rotate according to UpVectopr. On the right - non-normalized UpVector and a point. I need to rotate a point with UpVector.

How can this be done?


1 Answer 1


A vector has a rotate function - see mathutils.Vector.rotate

vec = mathutils.Vector((0.0, 1.0, 2.0))
eul = mathutils.Euler((0.0, math.radians(45.0), 0.0), 'XYZ')

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .