if (newState.IsKeyDown(Keys.S)) { camChange.X = -2f * (float)Math.Cos(((MathHelper.ToRadians(angle)))); camChange.Y = -2f * (float)Math.Sin(((MathHelper.ToRadians(angle)))); camTarget = Vector3.Transform(camTarget, Matrix.Invert(Matrix.CreateTranslation(new Vector3(camChange.X, 0, camChange.Y)))); camPosition.X = 10f * (float)Math.Cos(((MathHelper.ToRadians(angle)))) + camTarget.X; camPosition.Z = 10f * (float)Math.Sin(((MathHelper.ToRadians(angle)))) + camTarget.Z; } if (newState.IsKeyDown(Keys.W)) { camChange.X = 2f * (float)Math.Cos(((MathHelper.ToRadians(angle)))); camChange.Y = 2f * (float)Math.Sin(((MathHelper.ToRadians(angle)))); camTarget = Vector3.Transform(camTarget, Matrix.Invert(Matrix.CreateTranslation(new Vector3(camChange.X, 0, camChange.Y)))); camPosition.X = 10f * (float)Math.Cos(((MathHelper.ToRadians(angle)))) + camTarget.X; camPosition.Z = 10f * (float)Math.Sin(((MathHelper.ToRadians(angle)))) + camTarget.Z; } if (newState.IsKeyDown(Keys.A)) { angle += 2; camPosition = camTarget + Vector3.Transform(camTarget, Matrix.CreateRotationY(MathHelper.ToRadians(angle))) * 10; } if (newState.IsKeyDown(Keys.D)) { angle -= 2f; camPosition = camTarget + Vector3.Transform(camTarget, Matrix.CreateRotationY(MathHelper.ToRadians(angle))) * 10; }