Transformation fixes

More checks for non-flying worlds
This commit is contained in:
SDraw 2023-05-28 16:47:04 +03:00
parent 9159946de6
commit 732b15a6a9
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
9 changed files with 43 additions and 35 deletions

View file

@ -133,13 +133,9 @@ namespace ml_pam
if(PlayerSetup.Instance._animator.isHuman)
{
Vector3 l_hipsPos = Vector3.zero;
Quaternion l_hipsRot = Quaternion.identity;
Transform l_hips = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Hips);
if(l_hips != null)
{
l_hipsPos = l_hips.localPosition;
l_hipsRot = l_hips.localRotation;
}
HumanPose l_currentPose = new HumanPose();
HumanPoseHandler l_poseHandler = null;
@ -201,10 +197,7 @@ namespace ml_pam
l_poseHandler?.Dispose();
if(l_hips != null)
{
l_hips.localPosition = l_hipsPos;
l_hips.localRotation = l_hipsRot;
}
}
if(m_enabled)