Esempio n. 1
0
        private void DrawSkinnedModel(SkinnedModel skinnedModel)
        {
            float aspectRatio = Context.Graphics.Device.Viewport.AspectRatio;
            Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), aspectRatio, 1.0f, 10000.0f);
            Matrix view = Matrix.CreateLookAt(new Vector3(0, 1, 4), new Vector3(0, 0.5f, 0), Vector3.Up);

            skinnedModel.Render(view, projection, new Vector3(0), angle);
        }
Esempio n. 2
0
        public override void LoadContent()
        {
            var content = Context.Resources.Content;
            Context.Resources.Models.Add("weapon", content.Load<Model>(@"Models\Weapons\Pistol01"));
            Context.Resources.Models.Add("Chibi", content.Load<Model>(@"Models\Characters\Chibi\Chibi"));

            skinnedModel = new SkinnedModel();
            skinnedModel.Initialize(Context.Resources.Models["Chibi"]);
            skinnedModel.SetAnimationClip("Idle");
            //skinnedModel.SetAnimationClip("Run");
            //skinnedModel.SetAnimationClip("Take 001");
            //skinnedModel.SetAnimationClip("Default Take");
        }