I'm making a game with a large scrolling room and a very tall player character.
Because of the player's height, he's never truly centered in the screen and takes up too much of the top half.
How can I make the view-port anchored to a different part of the character?
in repeatedly executing function you could adjust the viewport yourself.
If you need help doing that I am sure someone could provide code or look up SetViewPort in the manual.
Something like this in repeatedly_execute_always:
SetViewport(cCharacter.x + Nx - System.ViewportWidth / 2, cCharacter.y + Ny - System.ViewportHeight / 2);
Where Nx and Ny are some distances from character's x and y, which you need to define yourself.
And half of the viewport sizes need to be subtracted, because SetViewport sets top-left corner in room coordinates, while character has to be centered.
When you are done (e.g. leaving the room or changing character view): ReleaseViewport();
QuoteSomething like this in repeatedly_execute_always:
SetViewport(cCharacter.x + Nx - System.ViewportWidth / 2, cCharacter.y + Ny - System.ViewportHeight / 2);
Where Nx and Ny are some distances from character's x and y, which you need to define yourself.
And half of the viewport sizes need to be subtracted, because SetViewport sets top-left corner in room coordinates, while character has to be centered.
When you are done (e.g. leaving the room or changing character view): ReleaseViewport();
Worked like a charm! I changed "repeatedly_execute_always" to "late_repeatedly_execute_always" because the character tends to jump around awkwardly otherwise.