Beispiel #1
0
        public SpectaterCamera(IXNAGame nGame, float nearPlane, float farPlane)
        {
            game    = nGame;
            enabled = true;
            game.AddXNAObject(this);
            nearClip = nearPlane;
            farClip  = farPlane;

            fieldOfView = MathHelper.ToRadians(45.0f);
            aspectRatio = 4 / 3f;
            view        = Matrix.Identity;//Matrix.CreateLookAt(new Vector3(0, 0, -4000), Vector3.Zero, Vector3.Up);
            CalculateProjection();
            CameraUp        = Vector3.Up;
            CameraDirection = Vector3.Forward;
            CameraPosition  = new Vector3(0.1f, 0.1f, 0.1f);
            AngleVertical   = 0;
            AngleHorizontal = 0;
            AngleRoll       = 0;
            enableUserInput = true;



            UpdateCameraInfo();
        }
 public void Initialize(IXNAGame _game)
 {
     ghostFace = new BoxMesh();
     _game.AddXNAObject(ghostFace);
 }