4 Added a couple of details.
source | link

Monogame How can I make the screen scrollingscroll only when the character is close to the edge?

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make thewant my camera scrolling(startto scroll over the level, following the player) oncharacter, only when the X-axischaracter is within the 20% border of the screen.

So, when let's say the player is not close to the edge of the window(like for example he has 20% of then the camera stays in place and not follow the player and when the player crosses this "scrolling line" the camera should smoothly follow hit. Let's say that my game window size(X-axis) left to go)?

I use C#is 1000px wide and 500px high, but the game map is 3000px wide and 3000px high.

Monogame screen scrolling

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling(start following the player) on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

I use C#

How can I make the screen scroll only when the character is close to the edge?

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

I want my camera to scroll over the level, following the character, only when the character is within the 20% border of the screen.

So, when the player is not close to the edge of the window then the camera stays in place and not follow the player and when the player crosses this "scrolling line" the camera should smoothly follow hit. Let's say that my game window is 1000px wide and 500px high, but the game map is 3000px wide and 3000px high.

3 added 12 characters in body
source | link

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling(start following the player) on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

I use C#

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling(start following the player) on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling(start following the player) on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

I use C#

2 added 28 characters in body
source | link

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling(start following the player) on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

On the internet, I saw videos and tutorials about screen scrolling. But those only show how to keep the player always in the center of the camera.

How can I make the camera scrolling(start following the player) on the X-axis when let's say the player is close to the edge of the window(like for example he has 20% of the window size(X-axis) left to go)?

1
source | link