diff --git a/code/glTF2Asset.inl b/code/glTF2Asset.inl old mode 100644 new mode 100755 index 96348d4f2..11e3965e5 --- a/code/glTF2Asset.inl +++ b/code/glTF2Asset.inl @@ -1023,7 +1023,12 @@ inline void Mesh::Read(Value& pJSON_Object, Asset& pAsset_Root) inline void Camera::Read(Value& obj, Asset& /*r*/) { - type = MemberOrDefault(obj, "type", Camera::Perspective); + std::string type_string = std::string(MemberOrDefault(obj, "type", "perspective")); + if (type_string == "orthographic") { + type = Camera::Orthographic; + } else { + type = Camera::Perspective; + } const char* subobjId = (type == Camera::Orthographic) ? "orthographic" : "perspective";