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
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.
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):
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!
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.
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!