I want to get the transformed position of the camera. (I'm removing the light position & rotation from the camera right?)
lx#=EntityX#(light,1) ly#=EntityY#(light,1) lz#=EntityZ#(light,1) lpitch#=EntityPitch#(light,1) lyaw#=EntityYaw#(light,1) lroll#=EntityRoll#(light,1) camx#=EntityX#(cam,1) camy#=EntityY#(cam,1) camz#=EntityZ#(cam,1) cpitch#=EntityPitch#(cam,1) cyaw#=EntityYaw#(cam,1) croll#=EntityRoll#(cam,1) EntityParent cam,light,True PositionEntity light,0,0,0 RotateEntity light,0,0,0 ;Grab the cameras transformed matrix (GetMatElement..) GetEntityMat cmat,cam ;Unparent the camera, reposition cam & light EntityParent cam,0 ;put the light back where it was PositionEntity light,lx,ly,lz,1 RotateEntity light,lpitch,lyaw,lroll,1 PositionEntity cam,camx,camy,camz,1 RotateEntity cam,cpitch,cyaw,croll,1