{"action":"closed","issue":{"url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/207","repository_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended","labels_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/207/comments","events_url":"https://api.github.com/repos/craftworkgames/MonoGame.Extended/issues/207/events","html_url":"https://github.com/craftworkgames/MonoGame.Extended/issues/207","id":157620432,"number":207,"title":"Suggestion: Camera2D to follow object","user":{"login":"SlowLogicBoy","id":3121637,"avatar_url":"https://avatars.githubusercontent.com/u/3121637?v=3","gravatar_id":"","url":"https://api.github.com/users/SlowLogicBoy","html_url":"https://github.com/SlowLogicBoy","followers_url":"https://api.github.com/users/SlowLogicBoy/followers","following_url":"https://api.github.com/users/SlowLogicBoy/following{/other_user}","gists_url":"https://api.github.com/users/SlowLogicBoy/gists{/gist_id}","starred_url":"https://api.github.com/users/SlowLogicBoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlowLogicBoy/subscriptions","organizations_url":"https://api.github.com/users/SlowLogicBoy/orgs","repos_url":"https://api.github.com/users/SlowLogicBoy/repos","events_url":"https://api.github.com/users/SlowLogicBoy/events{/privacy}","received_events_url":"https://api.github.com/users/SlowLogicBoy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-31T08:50:16Z","updated_at":"2016-06-10T12:46:01Z","closed_at":"2016-06-10T12:46:01Z","body":"I'm thinking about removing some of my logic from my game and referencing this project instead. \r\nAnd I can see that here I need to worry about moving the camera myself (outside camera object) to certaing position. \r\nHow about adding IFocusable (or something like that) to camera so camera could follow target by itself?\r\n```\r\npublic interface IFocusable\r\n{\r\n    Vector2 Position\r\n}\r\npublic class Camera2D : IMovable, IRotatable\r\n{\r\n    ....\r\n    public float MoveSpeed { get; set; }\r\n    public IFocusable Focus { get; set; }\r\n    public void Update(GameTime gameTime)\r\n    {\r\n        if (Focus != null)\r\n       {\r\n            var delta = (float)gameTime.ElapsedGameTime.TotalSeconds;\r\n            Position.X += (Focus.Position.X - Position.X) * MoveSpeed * delta;\r\n            Position.Y += (Focus.Position.Y - Position.Y) * MoveSpeed * delta;\r\n        }\r\n    }\r\n}\r\n```\r\nTo avoid hardcoded fuction how to move camera we could use something like:\r\n``` Func<IFocusable, GameTime, Vector2> MovementFunction;```"}}
{"actor":{"display_login":"craftworkgames"}}