Get rotation of polygon into mesh

how can i get the rotation of a polygon?
I want to get this rotation in euler (x, y, z), is that possible?

import bge
from collections import OrderedDict

class teste(bge.types.KX_PythonComponent):
    args = OrderedDict([
    ])

    def start(self, args):
        scene = self.object.scene
        mesh = self.object.meshes[0]
        for matid in range(len(mesh.materials)):
            for polygon in mesh.polygons:
                #get rotation of polygon?
    
    def update(self):
        pass

Does this help?

Polygons don’t have a rotation, but you can figure out what direction it’s ‘pointing’ (i.e. what direction the flat edge is looking at)

1 Like