How can my player be tracked across the stage?

0 favourites
  • 7 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hello, I just bought Construct 3 today and I have a question that I can't find an answer to. I did find answers to C2, but the example file was missing.

    I have a layout size of 1280x720

    My background is 2000x750, the idea is that my player can move left/right across the part of the stage that isn't initially visible/in view. Like Mario or any number of other platformers.

    The problem is that when he hits the end of the stage to the right, he keeps walking, but it's off screen and the 'camera' isn't following, so you can't see him.

    I have tried a lot of things but nothing seems to work. Any ideas?

    Thanks.

  • The easiest solution - add ScrollTo behavior to your character.

  • I tried that. It doesn't seem to make a difference. I tried it with a camera too, as found in some tutorials, but the camera simply follows the player as they walk off stage.

    Do you have an example file at all? Do I need to do anything to my stage?

    Thanks

  • In C3 select Start Page and search for Platformer template.

    ScrollTo works out-of-the-box, you don't need to do anything. Just add to the character and it should scroll.

    If it doesn't, this is probably because you changed something, like layer parallax setting.

  • It doesn't seem to work out of the box.

    If I open that template now, set the stage width to 500x500, the player is still able to go outside of the screen, and the camera doesn't follow. Eg:

    youtu.be/90HCW7Tu_Vk

  • You should change viewport size to 500x500 in project properties, not the layout size.

    Or you can enable Unbounded scrolling for the layout, but then you can get empty white space if your character moves too close to edges.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It works, you are my new favourite human. Enjoy the coffee!

    Thanks

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