Forum rules - please read before posting.

Camera

2

Comments

  • Please use pasteall or something similar next time you post code!  Images of partial code is not ideal.

    Try also disabling the MainCamera at the same time that you enable the two GameCameras:
    KickStarter.mainCamera.GetComponent <Camera>().enabled = false;

    That should be done after disabling the Camera system in Engine: Manage systems.

    You are also re-enabling the Camera system before your Engine: Wait Action - so it's being disabled and then re-enabled instnantly.

    Know that you can expose your GameCamera fields, and the state you want them to have, in a single Action to avoid writing seperate enable/disable Actions.
  • I tried it like that.But it did not work.I cannot control the player anymore.
  • Replace all of the Run function's code beneath the MainCamera line with:

    return 0f;

    As the description in there explains, this is necessary for "instantaneous" Actions.

    You will need to provide more detail than it just not working.  Did the transition work, or none of it?  What is the state of the three cameras afterwards?

    If the player cannot be controlled, it might be in Cutscene mode.  At the bottom of the Settings Manager, click List active ActionLists in Game window?.  What does the debug box in the corner of the Game window say when the ActionList is complete and control ought to be resumed?

    What do the 999+ errors in the Console window?  Please show the stracktrace of the first, which is displayed when selected.
  • Hi,
    i have done what you said.
    The transition works.
    Afterwards the MainCamera and GameCamera2 are enabled.GameCamera1 is disabled.
    The game is not in Cutscene mode.It is in normal mode.
    And for the other questions i will send you a couple of pictures.

    Thank you very much.

  • You don't need to disable the Trigger through code - use the Object: Send message Action at the start of the ActionList to send the message "Turn Off" to itself.

    The Trigger12 Action should have the same "return 0f;" change made to it.

    When complete, the GameCamera1 and GameCamera2 should have their Camera components de-activated - not the GameObjects themselves.

    The error is related to the camera issue, so should resolve itself once everything else is.  Try moving the second Engine: Manage systems Action below the ActionDeactivateCameraComponent.
  • I made the changes.ActionDeactivateCameraComponent does not work.The camera components are still active.How can i activate  GameCamera1- the GameObject.
    Thanks.
  • It doesn't look like you're deactivating them through your own scripts, which means it could be the third-party asset that's doing it.

    You can either look in the code of that asset, or just activate it as part of your Action:GameObject.Find ("GameCamera1").SetActive (true);
  • Hi,
    first .ActionDeactivateCameraComponent still does not work.Camera components do not get inactive.I tried to activate GameCamera1 in ActionDeactivateCameraComponent and Trigger12 but no chance.
    Have a nice weekend and thanks for help.
  • edited July 2017
    As a test, leave out the Trigger12 Action, and simply have the two GameCameras activate, wait a brief time, and then de-activate - with the MainCamera doing the opposite.  The two Actions you've posted should work fine - I've tested the code - so it could well be the third-party asset that's causing the issue.
  • Hi,
    now my player walks through the scene crossing the trigger turning camera components on andvout.And i can control the player but all other camera switches from AC are not working.Also the same error occurs.
    Thanks for helping.
  • edited July 2017
    And this is after removing the Trigger12 Action?  Which error, exactly?  There have been many.

    What does the MainCamera Inspector look like in full?  What are the exact states of the GameCameras - both gameobjects and Camera components?  In order to help, I need to know the fine details - giving me the broad overview is not enough, I'm afraid.
  • Hi,
    yes after disabling Trigger12 Action.
    Pictures after crossing Trigger12.(Player walks on and on and crosses Tigger12 until i click 
    somewherhe else.):
    After clicking somewhere else:
    pic9
    The disabled Trigger and the error is seen on every picture:
    Thanks.
  • pic6 is unnecessary.
  • Your first two images show GameCamera1 both enabled and disabled - what is the order here?

    It looks like they are being enabled correctly but not disabled afterwards - i.e. ActionActivateCameraComponent is running, but not ActionDeactivateCameraComponent.

    Instead of disabling the Trigger12 Action, use the ActionList Editor window to re-route the flow of Actions around it.
  • Hi,
    first the camera component is disabled.Then after walking through Trigger12 my Player is in an endless loop where the camera component is enabled and disabled until i click somewhere else.
    I cannot delete the connection between Trigger12 and EngineWait.
    Thanks for help.

  • Hi,
    i made what you said.
    Still the same behavior.
    Thanks.
  • When posting your ActionList, please show it in full, rather than a snippet - I need to see all of it.

    Where are you using the Object: Send message Action to disable the Trigger?
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.