Fixing issue 3500, invalid outer cone angle readed from gltf2 file on machines which defines M_PI as a double value

pull/3501/head
Jean-François Verdon 2020-11-16 09:19:13 +01:00
parent 48ec3ef458
commit 09ca11d063
1 changed files with 1 additions and 1 deletions

View File

@ -1230,7 +1230,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));
}
}