Notifications
Clear all

[Closed] Normal based Rotation

So is there a way to setup a rotation script to have an object follow the normal of a polygon or vertex?

1 Reply
1 Reply
(@bobo)
Joined: 2 years ago

Posts: 0

A normal does not describe an orientation completely. While you can orient one axis of an object to it, the other two axes have unlimited number of possible orientations. You could use the matrixFromNormal() method and extract the .rotationpart, but the X and Y would be, while not arbitrary, less explicitly defined. If that does not satisfy your needs, you would have to build your own matrix using an up vector and the normal. There was another post a couple of days ago about this:
http://forums.cgsociety.org/showthread.php?f=98&t=993062