|
Post by volkov on Apr 22, 2021 10:36:38 GMT
Hello, First off, I'd like to say that this plugin is just amazing! However, I'm not sure whether what I need to do now is implemented in Pro Camera 2D. My camera follows one or multiple targets, and I need these targets not to be covered by UI. Here is a screenshot of the issue: The result I need to have is the following: In order to do this with the previous example, I manually played with the y offset to put the UI under the player. But I'd need this to be done automatically. Do you have any idea how to do this, ideally using existing features from Pro Camera 2D? One detail: I'm using UI Toolkit to do the UI. Thanks in advance for your help, Volkov
|
|
|
Post by Luís Pedro Fonseca on Apr 25, 2021 21:53:02 GMT
volkov ProCamera2D doesn't handle UI at all. I'm sure there are ways to calculate what you need, but for that you don't need ProCamera2D. I'm not familiar with the UI Toolkit so unfortunately I can't help you with this question. If something else comes up please let me know.
|
|
|
Post by volkov on Apr 28, 2021 12:24:30 GMT
Hi Luis! Thanks for answering my message. I have been thinking about this for the past few days and fundamentally what I am trying to achieve is for the camera to have a padding (see the picture below). If the UI at the bottom has a height of 300px, then the bottom padding will be 300 (should the UI be managed with UI Toolkit or anything else). I find very convenient the features that allow to follow one or multiple targets, including the Cinematics module. What I'd like to do is for ProCamera2D to follow these targets within a rect which would be a subset of the camera view (defined by padding). To do that, the option I'm think about is to modify the follow targets calculation to include this notion of padding. So my question is: do you think that modifying these calculations is a good option and in order to extend ProCamera2D's features like Follow Targets, Cinematics, etc. is there a proper way to do so? (maybe you have some tips on where to look at to make my life easier) Thanks for your support, Volkov
|
|
|
Post by Luís Pedro Fonseca on Apr 28, 2021 22:19:57 GMT
volkov I think what you're trying to accomplish can be done with the Offset values of the ProCamera2D core component. Have you taken a look at that?
|
|
|
Post by volkov on Apr 30, 2021 7:14:42 GMT
Hi Luis,
Thanks for your response. It pretty much does the job indeed. However, the only thing that doesn't work in my scenario is when I use the Forward Focus with the "influence maintained" option checked. Basically when I jump the menu covers the character once landed and doesn't go away.
Is there any option to maintain the influence on x but not on y?
In the meantime I'll just disable the forward focus for y-axis.
|
|