Merge pull request #3501 from Nodrev/issue_3500

Fixing issue 3500, invalid outer cone angle readed from gltf2 file on  machines which defines M_PI as a double value
pull/3484/head^2
Kim Kulling 2020-11-16 22:03:54 +01:00 committed by GitHub
commit 749a4963a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1282,7 +1282,7 @@ inline void Light::Read(Value &obj, Asset & /*r*/) {
Value *spot = FindObject(obj, "spot");
if (!spot) throw DeadlyImportError("GLTF: Light missing its spot parameters");
innerConeAngle = MemberOrDefault(*spot, "innerConeAngle", 0.0f);
outerConeAngle = MemberOrDefault(*spot, "outerConeAngle", M_PI / 4.0f);
outerConeAngle = MemberOrDefault(*spot, "outerConeAngle", static_cast<float>(M_PI / 4.0f));
}
}