Ignore:
Timestamp:
2014-07-24 12:21:42 (6 years ago)
Author:
mijoilmo
Message:

varjosimulaattori

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2014/30/MikkoI/WindowsGame1/WindowsGame1/WindowsGame1/Camera/Camera.cs

    r5607 r5626  
    1313        public Vector2 size; 
    1414        public float zoomFactor = 1; 
    15         public float pitch = -45; 
     15        public float pitch = 0; 
    1616        public float yaw = 0; 
    1717        public Camera(Vector2 size) 
     
    2121        public Matrix getMatrix(Vector2 gridSize, Vector2 mapSize) 
    2222        { 
    23             viewPortBounds(); 
     23            //viewPortBounds(); 
    2424 
    2525            Vector3 pixelMapSize = new Vector3((gridSize.X * mapSize.X / 2), (gridSize.Y * mapSize.Y / 2), 0); 
     
    2727                Matrix.CreateRotationZ(MathHelper.ToRadians(yaw)) * 
    2828                Matrix.CreateRotationX(MathHelper.ToRadians(pitch)) * 
    29                 Matrix.CreateScale(zoomFactor, zoomFactor, 0) * 
     29                Matrix.CreateScale(zoomFactor, zoomFactor, 0f) * 
    3030                Matrix.CreateTranslation(new Vector3(size.X / 2, size.Y / 2, 0)); 
    3131        } 
Note: See TracChangeset for help on using the changeset viewer.