diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp
index ba3530491..0f9bdc868 100644
--- a/code/ColladaExporter.cpp
+++ b/code/ColladaExporter.cpp
@@ -454,13 +454,24 @@ void ColladaExporter::WriteSpotLight(const aiLight *const light){
mOutput << startstr << ""
<< light->mAttenuationQuadratic
<<"" << endstr;
-/* mOutput << startstr << ""
- << light->
- <<"" << endstr;
- mOutput << startstr << ""
- << light->mAttenuationLinear
- <<"" << endstr;
-*/
+ /*
+ out->mAngleOuterCone = AI_DEG_TO_RAD (std::acos(std::pow(0.1f,1.f/srcLight->mFalloffExponent))+
+ srcLight->mFalloffAngle);
+ */
+
+ const float fallOffAngle = AI_RAD_TO_DEG(light->mAngleInnerCone);
+ mOutput << startstr <<""
+ << fallOffAngle
+ <<"" << endstr;
+ double temp = light->mAngleOuterCone-light->mAngleInnerCone;
+
+ temp = std::cos(temp);
+ temp = std::log(temp)/std::log(0.1);
+ temp = 1/temp;
+ mOutput << startstr << ""
+ << temp
+ <<"" << endstr;
+
PopTag();
mOutput << startstr << "" << endstr;
@@ -1042,7 +1053,21 @@ void ColladaExporter::WriteNode(aiNode* pNode)
mOutput << "" << endstr;
if(pNode->mNumMeshes==0){
- mOutput << startstr <<"" << endstr;
+ //check if it is a camera node
+ for(size_t i=0; imNumCameras; i++){
+ if(mScene->mCameras[i]->mName == pNode->mName){
+ mOutput << startstr <<"" << endstr;
+ break;
+ }
+ }
+ //check if it is a light node
+ for(size_t i=0; imNumLights; i++){
+ if(mScene->mLights[i]->mName == pNode->mName){
+ mOutput << startstr <<"" << endstr;
+ break;
+ }
+ }
+
}else
// instance every geometry
for( size_t a = 0; a < pNode->mNumMeshes; ++a )