Avindr / MxM-IssueTracking

7 stars 0 forks source link

MxMBlendSpaceLayers - SetBlendSpacePositionY error #164

Closed Erik2v closed 2 years ago

Erik2v commented 2 years ago

I'm using the SetBlendSpacePositionY method int he MxMBlendSpaceLayers component.

I noticed that the the method has a bug:

    public void SetBlendSpacePositionY(float a_positionY, MxMBlendSpace a_blendSpace)
    {
        if (a_blendSpace == null)
            return;

        MxMBlendSpaceState bsState;

        if (m_blendSpaceStates.TryGetValue(a_blendSpace, out bsState))
        {
            a_positionY /= a_blendSpace.Magnitude.y;
            bsState.SetPositionX(a_positionY);
        }
    }

Notice the SetPositionX() call instead of SetPositionY().

Easy enough to fix, but it took a while to find out why my parameters weren't blending properly.

Avindr commented 2 years ago

Thanks for pointing that out. I've now fixed it in the dev build and will upload to Github soon. The fix will be included in any subsequent update on the asset store.