You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the process of making a 2D game it's typically required that the view is centered on whatever represents the player. At this point, I don't know how to do that apart from manually offsetting all coordinates of all sprites.
How to properly move the stage so that player is always in the center of the canvas view?
The text was updated successfully, but these errors were encountered:
//(0,0) for us is center of the screenstage.position.x=renderer.width/2;stage.position.y=renderer.height/2;//scale itstage.scale.x=2.0;stage.scale.y=2.0;//now specify which point INSIDE stage must be (0,0)stage.pivot.x=character.position.x;stage.pivot.y=character.position.y;
In my development version there's secret Camera object, and its possible to make it follow any object even if its inside some containers.
In the process of making a 2D game it's typically required that the view is centered on whatever represents the player. At this point, I don't know how to do that apart from manually offsetting all coordinates of all sprites.
How to properly move the stage so that player is always in the center of the canvas view?
The text was updated successfully, but these errors were encountered: