Merge pull request #14137 from hyperlogic/bug-fix/glitchy-movement-for-avatars

Bug fix for rotation culling in AvatarData::toByteArray()
This commit is contained in:
John Conklin II 2018-10-04 13:12:28 -07:00 committed by GitHub
commit 84178faee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -594,7 +594,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
// The dot product for larger rotations is a lower number.
// So if the dot() is less than the value, then the rotation is a larger angle of rotation
if (sendAll || last.rotationIsDefaultPose || (!cullSmallChanges && last.rotation != data.rotation)
|| (cullSmallChanges && glm::dot(last.rotation, data.rotation) < minRotationDOT) ) {
|| (cullSmallChanges && fabsf(glm::dot(last.rotation, data.rotation)) < minRotationDOT) ) {
validity |= (1 << validityBit);
#ifdef WANT_DEBUG
rotationSentCount++;