Merge pull request #18 from patrickp-unity3d/master
Check for NAN when applying position from readback
This commit is contained in:
Коммит
8d61864050
|
@ -244,6 +244,8 @@ namespace Unity.DemoTeam.DigitalHuman
|
|||
if (subjects[i].attachmentType != SkinAttachment.AttachmentType.Transform) continue;
|
||||
int index = subjects[i].TransformAttachmentGPUBufferIndex;
|
||||
Vector3 pos = readBackBuffer[index];
|
||||
if (float.IsNaN(pos.x) || float.IsNaN(pos.y) || float.IsNaN(pos.z) || float.IsInfinity(pos.x) || float.IsInfinity(pos.y) ||
|
||||
float.IsInfinity(pos.z)) continue;
|
||||
subjects[i].transform.position = pos;
|
||||
}
|
||||
|
||||
|
@ -1445,4 +1447,4 @@ namespace Unity.DemoTeam.DigitalHuman
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче