I have a list of vertices (mathutils.Vector), which form a rectangle in 3d space. I need to rotate these vertices around the pivot point. So I have two tasks:

  1. Find the pivot point
  2. rotate the vertices in 5 degree steps.

For the shape I can store the view_rotation, I guess I will need it:-)

def get_view_rotation(context):
    rv3d      = context.space_data.region_3d
    view_rot  = rv3d.view_rotation
    return view_rot  

Just saw the normal vector could be calculated like this:


I think I can rotate the vertices now around this normal vector, but how to do it?


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.