Hi!
I'm using Fake area light and it's working fine. However, when the parent node is scaling, the light recsize is incorret:
Code: Select all
Vector2 Light::getDerivedRectSize(void) const
{
Vector3 parentScale = mParentNode->_getDerivedScale();
return mRectSize * Vector2( parentScale.x, parentScale.y );
}
I have a fake area light that is attached to node who is rotated to be parallel to XOZ plane (because by default the fake area light is parallel to XOY plane). Then the node is scaled on XOZ plane (e.g. setScale(2, 1, 2)). However, the pareltScale in the code above does not take rotation into account so mRectSize is scaled only along X-axis. Is there an easy way to solve this problem?
Thanks!