0
$\begingroup$

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:

mathutils.geometry.normal(vectors)

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

$\endgroup$

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.