How do I set Camera Zone

0 favourites
  • 5 posts
From the Asset Store
*********** Fidget popper tile sets **************
  • Hello,

    So I have been tinkering with the camera/zone layouts, and would like to have the camera to stay in the zone, without showing the rest of the layout. I know it has something to do with the pixel size of the layout(maybe), but when I changed the equation the screen sets to the bottom right.

    I looked at some example capx. but haven't quite figured out the how/why it works to fix it. Basically castlevania/metroid camera movement is the end goal.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm unclear of what effect you are going for? If you can add more detail?

    Are you trying to prevent the camera from moving?

    Have the camera jump from point A to point B?

    Zoom the camera?

    Something different?

    Have the camera scroll only so far?

  • Hello,

    The camera should follow the player in each zone. I wanted the area that the player is in only visible. I attached a google link if it helps. The player box "scroll to" is disabled. When I try changing the numbers the camera seems offset to the right. Then the player appears the camera follows the player, when the player gets to the next zone, the camera shifts again but offset to the right.

    WASD-Controls, the code is at the bottom in the "main" event sheet.

    Thank You

    drive.google.com/open

  • Oh, I see,sort of like how the old school megaman camera works? It follows you, but keeps the next "room" hidden until you actually enter it.

    Is that accurate?

    I think the method I would use would be something like.

    Have a camera sprite, the size of the viewport, it has collision turned on.

    On a separate layer, I would build collision boxes to corral the camera box. This would allow the camera to be pinned to the player. The camera then follows, but is unable to move to far left/right/up/down when the player is next to walls or near a zone edge, due to the binding boxes you setup on a 0 opacity layer.

    Does that make sense?

  • Hello,

    Yes, Megaman is a much better example.

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