Forum rules - please read before posting.

UFPS + Cinema Director + Override AC Camera?

edited March 2015 in Technical Q&A
Hi,

I have a question about UFPS + the Cinema Director AC action. 

First, I'm pretty sure my player is set up correctly: AC spawns my UFPS player prefab, whose child camera (FPSCamera) is not tagged MainCamera. Then it retags _Cameras/MainCamera as "Untagged" and tags FPSCamera as MainCamera.

I kick off a Cinema Director action that controls _Cameras/MainCamera, with "Override AC Camera?" ticked.

Unfortunately, rendering is being done through FPSCamera, so changes to _Camera/MainCamera don't show.

I have a kludge in place right now. I wrote a simple action to disable FPSCamera's camera before the Cinema Director action, and then re-enable it after the Cinema Director action.

Is there a better way?

Comments

  • edited March 2015
    Yes - now that I'm aware it, I'll endeavour to fix it.  Thanks for reporting.
  • Thanks! I'm just digging into getting UFPS and AC working together, so it's good to know I'm not just doing something wrong (at least in this case!).
  • I believe this is fixed in v1.43a.
  • Thanks, Chris! I'll check it out and let you know.
  • Chris,

    I updated to AC 1.43a, and I'm afraid the issue is still there.

    I also get this error when AC spawns the player (your UFPS AdvancedPlayer prefab):

    Error: (AdvancedPlayer(Clone) (vp_FPWeaponHandler)) Hierarchy error. This component must be added to a gameobject with vp_Weapon components in child gameobjects.
    UnityEngine.Debug:LogError(Object)
    vp_WeaponHandler:GetWeaponList(Transform) (at Assets/UFPS/Base/Scripts/Gameplay/Player/vp_WeaponHandler.cs:205)
    vp_WeaponHandler:InitWeaponLists() (at Assets/UFPS/Base/Scripts/Gameplay/Player/vp_WeaponHandler.cs:114)
    vp_WeaponHandler:get_Weapons() (at Assets/UFPS/Base/Scripts/Gameplay/Player/vp_WeaponHandler.cs:47)
    vp_WeaponHandler:Awake() (at Assets/UFPS/Base/Scripts/Gameplay/Player/vp_WeaponHandler.cs:97)
    UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
    AC.KickStarter:ResetPlayer(Player, Int32, Boolean, Quaternion) (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:639)
    AC.KickStarter:Awake() (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:741)

    This is in the title scene, which runs an actionlist OnStart that kicks off a Cinema Director cutscene.

    When the player clicks "start," it loads the main scene, which reports this error:

    MainCamera has no MainCamera component.
    UnityEngine.Debug:LogError(Object)
    AC.KickStarter:Awake() (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:863)

    In the main scene, _Cameras/MainCamera is tagged MainCamera. But at this point in gameplay mode it's been set to Untagged. I haven't dug into whether AC or UFPS is doing that.
  • AC does that automatically - it'll only tag the MainCamera as such when you switch camera in e.g a Cutscene.

    Has the Cinema Director cutscene ended by the time the scene changes?  I'm not sure if this issue is down to using CD or UFPS at the same time.

    As for the first error, I think I've managed to recreate it now.
  • edited April 2015
    For the second error (no MainCamera), the Cinema Director cutscene was active when I switched to the next scene. What's the best practice on this? Kill active actionlists before changing scenes via SceneManager?
  • To be safe, you don't want to have a CD cutscene running when you change scene.  Allow the camera change to be reverted before switching.
  • Okay, will do. Thanks!
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.