void applyAttachment ( ) { if ( body == null || staticLight ) return ; restorePosition . setToTranslation ( bodyPosition ) ; rotateAroundZero . setToRotationRad ( bodyAngle + bodyAngleOffset ) ; for ( int i = 0 ; i < rayNum ; i ++ ) { tmpVec . set ( startX [ i ] , startY [ i ] ) . mul ( rotateAroundZero ) . mul ( restorePosition ) ; startX [ i ] = tmpVec . x ; startY [ i ] = tmpVec . y ; tmpVec . set ( endX [ i ] , endY [ i ] ) . mul ( rotateAroundZero ) . mul ( restorePosition ) ; endX [ i ] = tmpVec . x ; endY [ i ] = tmpVec . y ; } }
Applies attached body initial transform to all lights rays