Forum rules - please read before posting.

[SOLVED] Camera:Switch Problem

edited July 2014 in Technical Q&A
This is an odd one...

It seemed to work fine before, but the camera:switch action during a cutscene seems to have stopped working, but only in one specific scene. The crossfade/splitscreen functions all work fine, but the switch seems to have stopped altogether.

I've deleted the cutscene and created it again but still no luck.

This is very strange!

Comments

  • Need more than this - there's been no change to the script. Is the action being run from an asset? What kind of GameCamera are you trying to switch to?
  • It's just trying to switch from Cam1 to Cam2 - both standard GameCameras. It's running from a simple cutscene that's called when the scene loads.

    The camera:switch works fine in other scenes but just will not work on this one particular scene, although it used to and no changes have been made.

    I've even deleted the cutscene and cameras and created it again but get the same result. Crossfade and all other effects work fine.
  • Is this an instant switch?  First I'd recommend updating to 1.36, and then see if it persist.  If not, it may be best to do a bit of debugging on your end - inside the MainCamera script's FixedUpdate field, insert this line:

    Debug.Log (attachedCamera.name);

    In the console, this will display the name of the "active" GameCamera at any time - use it to see if this changes to the correct camera.  Let me know the result and we'll go from there.
  • Thanks Chris, that fixed it - well, sort of. 

    I noticed that at some point the MainCamera's script had been unchecked for some reason (I must've caught it at some point.). Obviously it works fine as soon as the script is enabled again.

    Thanks again pal, much appreciated!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.