From 2786930250187805e91a794171eaa64d724c5f9e Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Tue, 15 May 2012 23:10:39 -0500 Subject: [PATCH] Updating changelog Attempting to add center tracking of body --- axios/Axios_settings.cs | 1 + axios/ScreenSystem/Camera2D.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/axios/Axios_settings.cs b/axios/Axios_settings.cs index c016291..3b9af6c 100644 --- a/axios/Axios_settings.cs +++ b/axios/Axios_settings.cs @@ -78,6 +78,7 @@ * - Modfying draw method in AxiosGameScreen to draw Gleed2D textures * - Fixing path placement in Farseer * - Moving base.draw to last in AxiosGameScreen to make sure Farseer debug information is visible + * - Removing old debugging code * */ diff --git a/axios/ScreenSystem/Camera2D.cs b/axios/ScreenSystem/Camera2D.cs index 8c117ad..78f2809 100644 --- a/axios/ScreenSystem/Camera2D.cs +++ b/axios/ScreenSystem/Camera2D.cs @@ -30,6 +30,24 @@ namespace FarseerPhysics.SamplesFramework private Body _trackingBody; private Vector2 _translateCenter; private Matrix _view; + + /*private Vector2 _viewCenter; + + public Vector2 ViewCenter + { + get { return ConvertUnits.ToSimUnits(_viewCenter); } + set + { + _translateCenter = ConvertUnits.ToDisplayUnits(value); + Resize(); + } + } + + + private void Resize() + { + _batchView = Matrix.CreateTranslation(new Vector3(-ViewCenter.X, -ViewCenter.Y, 0)) * Matrix.CreateScale(Zoom); + }*/ /// /// The constructor for the Camera2D class.