daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             // Draw the model. A model can have multiple meshes, so loop.
  2.             foreach (ModelMesh mesh in myModel.Meshes)
  3.             {
  4.                 // This is where the mesh orientation is set, as well as our camera and projection.
  5.                 foreach (BasicEffect effect in mesh.Effects)
  6.                 {
  7.                     effect.EnableDefaultLighting();
  8.                     effect.World = transforms[mesh.ParentBone.Index]
  9.                         * Matrix.CreateRotationY(modelRotation)
  10.                         * Matrix.CreateRotationX(modelRotation)
  11.                         * Matrix.CreateTranslation(modelPosition);
  12.                     effect.View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);
  13.                     effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
  14.                         aspectRatio, 1.0f, 10000.0f);
  15.                 }
  16.                 // Draw the mesh, using the effects set above.
  17.                 mesh.Draw();
  18.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top