playMaker

Author Topic: Cut to Camera Reliably?[SOLVED]  (Read 1922 times)

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Cut to Camera Reliably?[SOLVED]
« on: February 24, 2016, 12:08:05 PM »
I have a simple scene with 4 cameras setup and 4 unity buttons to switch cameras.  All is setup using 'Cut to Camera'... and it works... sortof.

But when I try to click the buttons to switch cameras sometimes it works and sometimes, not so much.  I have tried using the 'Make Main Camera' checkbox and this seems to make it a little more reliable.

Just wondering if there is something else I need to do to make this work more reliably?

Thanks!
« Last Edit: February 25, 2016, 11:16:40 AM by mTruly »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: Cut to Camera Reliably?
« Reply #1 on: February 24, 2016, 07:18:25 PM »
I suspect you sometimes have more than one camera active. Cut To Camera assumes one active camera: the current main camera is disabled and the camera to cut to is enabled. Other cameras are not effected. So if you have multiple active cameras the result would seem unreliable.

You could make sure only one camera is active, e.g. have an Init state that de-activates all but one camera. Or use Activate GameObject to explicitly turn individual cameras on/off.

Does that help?

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Cut to Camera Reliably?
« Reply #2 on: February 25, 2016, 09:50:12 AM »
Thanks very much for the ideas Alex!

I will look into this and report back.

Thanks again.

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Cut to Camera Reliably?
« Reply #3 on: February 25, 2016, 11:13:42 AM »
I added the Activate Game Object action to each state so that only one camera was active at a time and now the switching between cameras works flawlessly.

Thanks again Alex.