Change viewport position

0 favourites
  • 8 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hello,

    i'm new at construct 3 and I can't find a topic "how to change the position from the viewport".

    I just want to start at the left bottom.

  • the viewport has to be "scrolled" in gameplay. You can use the ScrollTo behavior - put it on your player - and the viewport will always follow your player.

    you can also use a System event to Scroll To location... subsequently you can do that Every Tick to player.x, player.y and that would function the same as the ScrollTo behavior.

  • the viewport has to be "scrolled" in gameplay. You can use the ScrollTo behavior - put it on your player - and the viewport will always follow your player.

    you can also use a System event to Scroll To location... subsequently you can do that Every Tick to player.x, player.y and that would function the same as the ScrollTo behavior.

    Thx, that was really helpful!

  • Hello,

    What if I want to "teleport" the character and change the viewport to another location instantly, without scrolling (which normally takes a few seconds)?

    Do you have any ideas?

    Thanks in advance.

    Kind regards,

    Mihai

  • mfalcuta

    set ViewPort X and Y to player X Y there are system expressions for that.

  • Hi George,

    Thanks a lot,

    Can you be more specific? This was my initial idea as well, but I cannot identify how to set the view to a specific x,y.

    Kind regards,

    Mihai

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use the scroll to system expression and then put the desired X and Y coordinates, if u don't use lerp or any smoothing algorithm viewport will snap to the position set.

    so if you teleport the character and want the camera to always be on him just set it everytick (it will do the same thing as the scroll behavior for objects), make sure your layout is large enough to pan the view though.

  • Hi,

    Thanks a lot, solved it!

    Best,

    Mihai

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)