mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-11 15:08:59 +08:00
fix: some issues where MoveIndependently did not properly update (#587)
This commit is contained in:
parent
efdb5dbe8b
commit
f0a4db0a06
@ -123,7 +123,7 @@ namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
||||
var deltaRot = Quaternion.Angle(localRotation, state.childLocalRot);
|
||||
var deltaScale = (localScale - state.childLocalScale).sqrMagnitude;
|
||||
|
||||
if (deltaPos.sqrMagnitude < EPSILON && deltaRot < EPSILON && deltaScale < EPSILON)
|
||||
if (deltaPos.magnitude < EPSILON && deltaRot < EPSILON && deltaScale < EPSILON)
|
||||
{
|
||||
Matrix4x4 childNewLocal = parent.worldToLocalMatrix * state.childWorld;
|
||||
|
||||
@ -190,9 +190,11 @@ namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
||||
var deltaRot = Quaternion.Angle(_priorFrameState.rotation, transform.rotation);
|
||||
var deltaScale = (transform.lossyScale - _priorFrameState.lossyScale).sqrMagnitude;
|
||||
|
||||
if (deltaPos.sqrMagnitude < EPSILON && deltaRot < EPSILON && deltaScale < EPSILON) return;
|
||||
if (deltaPos.magnitude < EPSILON && deltaRot < EPSILON && deltaScale < EPSILON) return;
|
||||
|
||||
CheckChildren();
|
||||
|
||||
_priorFrameState = transform.localToWorldMatrix;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user