You need to transpose it into the object's space.
tformpoint lightX,lightY,lightZ,entityToLight,0
positionLight tformedX(),tformedY(),tformedZ()
then get the vector from the tformed position.(Remember move the light back, or just work directly on the tform funcs.)
tformpoint lightX,lightY,lightZ,entityToLight,0
positionLight tformedX(),tformedY(),tformedZ()
then get the vector from the tformed position.(Remember move the light back, or just work directly on the tform funcs.)