Hello Guest

Author Topic: Multiple Cameras with multiple scaling overrides  (Read 3168 times)

playspace

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Multiple Cameras with multiple scaling overrides
« on: August 30, 2017, 10:43:15 am »
Hi there,

I was playing around with multiple cameras to be able to create a camera for our HUD and for our game elements. We need such a setup to be able to scale the game view without affecting the HUD itself.

But when I use multiple cameras and link them together the matching overrides are always shared between both, so if I want one camera to Fit Height I can not have a second camera to Fit Width.

Is there a better way to achieve such a scenario?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multiple Cameras with multiple scaling overrides
« Reply #1 on: August 30, 2017, 11:26:37 am »
There's no reason why that shouldn't work - the cameras aren't linked to each other. Have you set up layers correclty so objects are masked from each camera appropriately?

playspace

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Multiple Cameras with multiple scaling overrides
« Reply #2 on: August 30, 2017, 11:29:24 am »
Yep,

when all is linked together, layers and depth is setup the override is shared between both. Both using the first one that fits. How should I setup the override so that the HUD camera pickus up a different one?

I modified the source a bit and I tried to select the override matching the name with the name of the camera. Once the HUD camera uses a different override from it's inherited one it stops drawing.
« Last Edit: August 30, 2017, 11:40:54 am by playspace »

playspace

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Multiple Cameras with multiple scaling overrides
« Reply #3 on: August 30, 2017, 11:59:59 am »
I got some additional info, when I have a custom override for each one but the HUD cameras override uses the same Auto Scale as the inherited camera the HUD is drawn as expected. Btw this only happens if the scaling methods are Fit Width in the inherited and Fit Height in the other HUD one.
« Last Edit: August 30, 2017, 12:06:05 pm by playspace »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multiple Cameras with multiple scaling overrides
« Reply #4 on: August 30, 2017, 05:37:38 pm »
Can you send me a repro of this to the support email? I will not be able to look at this in the next 2 days as I will be travelling but I will after that.

playspace

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Multiple Cameras with multiple scaling overrides
« Reply #5 on: August 31, 2017, 07:21:38 am »
I'll try to prepare one as soon as possible.