Camera zooming in / out, but not affecting certain layers

Fodder76Fodder76 Member Posts: 154
edited November -1 in Working with GS (Mac)
Hi there,

I need your help once more, GameSalad community.

I'm trying to build a scene where you have a map in the center of the screen. When the player taps the screen the camera zooms into that spot.

That much is no problem, but I want certain elements to not move at all. I understand that scrollable can help here, but I think it only helps when the camera moves around side to side, up and down, and not when the camera zooms in and out.

If anyone can offer a solution I'd be eternally grateful!

Thanks very much.

Comments

  • Fodder76Fodder76 Member Posts: 154
    Bumping so this doesn't get lost. I'm going to guess there isn't a super easy solution. This makes me sad.

    If I don't see an answer at some point today, I'll do the reverse I suppose. Rather than bring the camera to the map, I'll bring the map to the camera.
  • StusAppsStusApps Member, PRO Posts: 1,352
    I had this decision a long time ago in a game I was making, in the end I decided to make all the HUD elements just fade out when the zoom was on and when the touch was released it zoomed out and they faded back in.

    Probably not much use for you as you probably want those elements on the screen. I think your idea of bringing the map to the camera may be the easiest solution.
  • Fodder76Fodder76 Member Posts: 154
    Thanks very much StusApps!

    I will be fading out the elements that are currently on the screen, but I will also need to fade in new elements, which would be difficult if I have to try to figure out where the camera is.

    Its helpful to know that there isn't an easy way to do it, now I can focus on what is possible, rather than what isn't. I appreciate the reply!
  • mlaftamlafta Member Posts: 147
    I suggest you create a game attribute "Size Factor" to hold the a value between (0.1 to 1.0)
    Add change attribute behavior "change Size" by multiplying the size with this factor, to all actors you want to be zoomed by this factor. This way when you spawn new actors they will all follow that factor.
  • Fodder76Fodder76 Member Posts: 154
    Ok thanks mlafta, I'll look into that when I get home tonight.

    I appreciate it!
Sign In or Register to comment.