Here is a modification of the function that will return a point at unit distance in the direction of the light source: def getCosinesFromEuler(roll,pitch,yaw):Īnd it can be called like this : # assuming ob is the light object The function for calculating the total rotation matrix is given here. In blender, since the unit vector starts from the z-axis (the light points down when initialized), I think you could use the last column of the total rotation matrix.
0 Comments
Leave a Reply. |