Oct 15, 2013 at 7:25 PM
Edited Oct 16, 2013 at 12:36 AM
I'm making use of the Camera2D class released in the samples together with MonoGame. However I am having trouble with the camera movement speed. Let me explain the situation.
I have made a level which is twice my resolution of 1920 in width. In this level I have a player which is the TrackingBody of the camera.
The camera has the following temporary test min/max positions which balance it exactly on the left and right borders:
Camera.MinPosition = new Vector2(960, 0);
Camera.MaxPosition = new Vector2(2880, 540);
The player can move left/right and perform a simple jump. The tracking works fine as long as I dont drag and flick it away :P. When the player approaches the min or max position of the camera the camera starts to slow down. At the slowest moving one pixel.
I know this is intended behavior, but is there a way I can keep the camera the same smooth speed as the player is moving by removing this "inertia".
PS. I tried messing with the inertia, but I dont quite understand the calculation and the camera started blinking weirdly.
EDIT: Camera2D from the Farseer samples version 3.5
EDIT 2: Perhaps someone has a good parallax background example that uses the Camera2D? I used
to get it to work.