Dot product with local axis in maxscript

701 views Asked by At

If i need to select some polygons perpendicular to a specific axis (say x, which is [1,0,0] I'm doing a dot product like that

axis = [1,0,0]  
normal = polyOp.getFaceNormal $ 1
result = dot normal axis

Where 1 is the face I need to check. If the dot product is 1, then my polygon is perpendicular. How do I check against a local axis? In other words, imagine the object is rotated and I need to select the faces perpendicular to its local z. How do I do that?

Edit: Even multiplying the node by the object with polyop.getFaceNormal $ 1 * $.rotation the result is exact the same.

LOcal rotation problem

1

There are 1 answers

3
Swordslayer On

Don't query the node, query the Editable poly object itself:

polyOp.getFaceNormal $.baseObject 1