Beispiel #1
0
        public MountAnimationGeneratorService(AnimationSettingsViewModel animationSettings, Rmv2MeshNode mountMesh, int mountVertexId, int riderBoneIndex, AssetViewModel rider, AssetViewModel mount)
        {
            _animationSettings = animationSettings;
            _mountVertexId     = mountVertexId;

            _riderBoneIndex = riderBoneIndex;
            _riderSkeleton  = rider.Skeleton;
            _mountSkeleton  = mount.Skeleton;

            float mountScale = (float)_animationSettings.Scale.Value;

            mount.SetTransform(Matrix.CreateScale(mountScale));
            _mountVertexPositionResolver = new MeshAnimationHelper(mountMesh, Matrix.CreateScale(mountScale));
        }