Forum rules - please read before posting.

Camera View Into UI Panel

Hello everyone!
I would like to make a camera zoom (change camera) when I click on hotspot.
Following the 3D demo tutorial I have come to realize it but I would like to know, if is possible, how can I make this new camera view appear inside a window (UI Panel) with a button to return to the previous camera.

Thanks!

Comments

  • Fracto,

    From my understanding creating a custom menu that has this UI window with the 'return' button is the option, so the action list from the hotspot that changes to this new 'zoomed in' camera would also then have an action to turn the custom menu (with the return/go back button UI) on. Then you'll link that return button to an action list that when pressed will turn the menu off and revert camera back to the zoomed out camera.

    Mike.
  • edited February 2017
    Hi Mike!
    Thanks for your quick response. I understand perfectly what you're saying but my idea is as indicated in the attached image:


    For example, I have a hotspot (table) with other hotspot on it (book, drawer...). 
    My first interaction object is the table (main camera view) and when I interact a "pop-up" window opens a panel with a view from other camera inside, where I can interact with objects that are in the table (the main camera background is "freeze" or in pause).

    EDIT: Indicate that I'm working on a Isometric view game. 
    I tried a simple switch camera and it hasn't worked.

  • edited February 2017
    The Camera: Switch Action is used for switching the "whole screen" camera, not for displaying an "insert" camera on top.

    An "insert" camera can be made following Unity's docs at the bottom of this page.  This could be enabled via a simple script triggered by the Object: Send message Action, or within a custom Action directly.

    However, things get more tricky if you want to make this new camera interactive.  AC relies on the MainCamera prefab in your scene for this, and so merely making the new camera appear will still make the cursor act as though the main camera is still the interactive one.

    In certain cases, such as when using UFPS for camera movement, you can get around this simply by disabling the MainCamera and having your new camera tagged as Main.  However, this is different because not only do you need both cameras active simultaneously, you also need interactivity to be isolated to a small part of the screen.

    I would recommend, therefore, that you actually change the MainCamera itself to become the "insert" camera when necessary.  This will prevent interactivity from outside the window.  You can still use Camera: Switch to cut to your close-up camera, but you would also have to run a custom script/Action that does the following (generally speaking):
    • Changes the Viewport Rect of the MainCamera to the smaller size
    • Enables the last GameCamera's Camera component to act like the full-screen camera
    • Sets the depth values of the two Cameras so that they are displayed in the correct order

    I appreciate that's probably not as straightforward as perhaps you were hoping, but from a technical standpoint, what you're after as actually quite tricky!

  • @FRACTO

    Haha, well since I'm quite inexperienced the very fact that I thought I had a solution should have been enough of a red flag for me to realise that I must have misunderstood exactly what your issue was and it required a more complex answer to what I gave! Thanks for kindly explaining the issue further, there are some on the internet who get quite aggressive when getting silly answers from people misunderstanding questions like I did haha.

    Does sound a tricky one though, would be interested to know if you manage to solve it and exactly how you do it (following Chris's advice exactly or doing something else/additional) because the actual concept you're trying to achieve does sound useful!

    Mike.
  • @ChrisIceBox
    Thanks for response! I will study that.

    @mjbcfc
    Haha, no problem! Although I have time with Unity and AC is the first time I get firm in getting a game... I'm sure that I'm much more inexperienced than you haha It's not much help using Google Translator to explain technical issues! ;)
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.