How do I maintain HUD/UI position when shifting camera zones

0 favourites
  • 4 posts
From the Asset Store
Bring a cool, frosty look to your game with the Frosty UI Kit.
  • I'll try to describe this as accurately and simple as possible:

    The Player moves around "Zones" where the camera scrolls to and focuses based on what zone the player is in. (ex: Mega Man, Castelvania, Older Top-down Zeldas, Binding of Isaac etc.)

    The camera moves fine, but I don't know how to make the player's selection menu hud move when the camera shifts, and here's why:

    The menu consists of these elements: A sprite background image, and 8 individual text objects.

    When I attempted this, I used the camera zone sprites (which work as "Every Tick->is Player overlapping Zone->Scroll to Zone) and placed a new image point on those camera zone sprites. I then tried "Every Tick->is Player overlapping Zone->Set MenuBackground to Zone (image point 1)" and it worked find for the menu background.

    However, when I tried to do the same for the text objects (which I put into a family), All the text objects would be smashed together. I know this is because it's telling all the text objects to move to the same image point.

    I need to be able to move all the text objects to the active "Zone", while still keeping it's position relative to the screen. How can I achieve this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Figured it out-

    The very complicated solution is:

    Anchor behavior.

  • Couldn't you just use a UI layer with parallax attribute set to 0,0 ?

    So it will always follow the camera

  • That works too but I think Anchor is good if you want to keep aspect ratio scaling in mind.

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