Search Unity

[RELEASED] Pro Camera 2D - The definitive 2D & 2.5D Unity camera plugin

Discussion in 'Assets and Asset Store' started by luispedrofonseca, Jul 29, 2015.

  1. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @jeffweber Thanks! Not yet, but I haven't forget! ;)
     
  2. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    Hi all, just to let you know that I've submitted v2.0.0 for approval!

    In the meantime I'm working at my full-time job, updating the demos for GDC, the new promo video and updating the website.

    Wish me luck! :)
     
    Too-Nerd-To-Die and Arx like this.
  3. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Good luck!
     
    luispedrofonseca likes this.
  4. Arx

    Arx

    Joined:
    Jan 28, 2014
    Posts:
    22
    Hey, this asset looks wonderful, thanks for the hard work you put into this! I've done something similar for my project from scratch, so I know how much work this is, and your plugin does everything that my scripts do and much more, so I guess it's time for me to switch to yours :).

    Is there any built-in way to change the overall offset of the camera, or turn Follow X and Follow Y properties on/off by a trigger, similar to numeric boundaries trigger? Or would I have to write my own trigger? It seems simple enough to do myself, I just don't want to reinvent the wheel if it's already there somewhere :).

    Is it possible to have one trigger object, defining the trigger area, with multiple triggers attached to it as components? So that I can have one area which upon entering changes numeric boundaries, offsets, turns on/off the follows, changes influence etc.

    Also, I need "offset flipping" - I have a 2D platformer. When the character (camera target) moves to right, it should be located roughly in the left third of the screen (horizontally), i.e. the X offset of the camera should be for example 5. When the character flips and starts moving to the left, the camera should transition in a way that the character is now located in the right third of the screen, i.e. the offset should now be -5. But this change of offsets should probably be smooth, not immediate. Do you have any protips on this? (I mean, a smooth transition between two different offsets proved to be a vital feature for me.)

    Thanks again!

    Edit: seems like the answer to question 2 (one trigger objects with multiple trigger components attached) is yes, it is possible :) nice!
     
    Last edited: Mar 8, 2016
    Too-Nerd-To-Die likes this.
  5. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @Arx Thanks for your interest in ProCamera2D!

    There currently isn't a trigger that toggles FollowX/Y but that should be super simple to do if you look at the documentation. In case you have doubts feel free to email me.

    The "offset flipping" you describe is exactly what the Forward Focus extension does. Take a look at the demo! ;)
     
    Arx and Too-Nerd-To-Die like this.
  6. Le-nain

    Le-nain

    Joined:
    Nov 26, 2012
    Posts:
    62
    Hello,

    First of, great job. Truly a great great GREAT asset. And I've already seen several updates since I started using it, adding great stuff, so kudos on that.

    I have a simple question (using version 1.9.1) concerning zooms, and interactions between them:
    - I have the speed-based zoom plugin enabled.
    - I'm also using some TriggerZoom from times to times. In this particular case, it's a zoom out.
    => It appears that they kinda conflict with each other, when I'm within the trigger but standing still, as the trigger makes it zoom out, but the speed based plugin wants to zoom back in. As my trigger as a much lower smoothing than the plugin, it still leans towards the zoomed out (which is great), but it never reaches a stable state and thus it appears "shaky", because they both try to zoom in their direction.
    cf gif, the orthographic size just keeps going back and forth

    Any way of fixing this on my side, or do you need to do it? (or maybe it has been fixed in 2.0, but there's no mention of it :p)

    Thanks in advance!
     
  7. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @Le nain Thanks!

    Actually, v2.0 will solve the conflicts. With the refactor done in v2.0, the extensions adjustments are now handled in a more orderly fashion (each extension acts at a specific point in time and takes the "result" from the previous extension).

    However, at this point it's still not possible to define which extension should have more "weight". I'm planning to add this in a future update.

    I've been very busy and I wanted to get v2.0 out there as soon as possible (before GDC), but unfortunately the docs aren't updated yet. I'm currently working in the updated demos and a new promo and hopefully next I can address that.
     
    Le-nain and Too-Nerd-To-Die like this.
  8. firebelly

    firebelly

    Joined:
    Apr 22, 2013
    Posts:
    12
    Is the transition extension meant to be triggered manually? When I load my scene with it enabled, it just remains black. If I click the "Transition Enter" button it will fire though. Just curious, I know the docs aren't out yet!
     
  9. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @firebelly Yes, the transitions need to be triggered manually using the methods "TransitionEnter" and "TransitionExit" accordingly. I think I'm going to add an option to start the Enter transition automatically on Start.

    Any how, the reason you're seeing the scene as black on Start is because you have the option "Start Scene On Enter State" selected (by default). Which basically starts the Enter transition and pauses it.

    I'm hoping to have some time to update the docs this week! Sorry for the inconvenience.
     
  10. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    103
    I got so excited with the Camera Transition and this new method "MoveCameraInstantlyToPosition".

    But it won't work well when the camera is on numeric boundaries then I saw you changed the Transition Duration to be automatic when 0 (It worked only on values > 0 before and had this small transition). Can you do the same for the Zoom Smoothness to lose the transition fx?

    I need to transition from an outdoor area to an indoor surrounded by boundaries on the same scene but I don't want the transition movement effect.
     
  11. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @nunesbarbosa I'm not exactly sure I fully understood your issue. Can you please contact me through support with more details?
     
  12. firebelly

    firebelly

    Joined:
    Apr 22, 2013
    Posts:
    12
    Awesome!
     
  13. Le-nain

    Le-nain

    Joined:
    Nov 26, 2012
    Posts:
    62
    Thanks for the answer.
    Anyways, I'm not in a rush since my game targets (at least for now) the mobile market, and the shaking isn't that noticeable at this small scale!

    Enjoy the GDC ;)
     
  14. firebelly

    firebelly

    Joined:
    Apr 22, 2013
    Posts:
    12
    I am having issues triggering the exit transitions. Do I have to change the state of the FX? I think what is happening is the method is called, but the script isn't in the correct state. I'm still looking at the script to figure it out from the code. If you have any quick tips, let me know!
     
  15. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @firebelly All you need to do is:

    Code (CSharp):
    1. yourTransitionsFXExtension.TransitionExit();
     
  16. BAIZOR

    BAIZOR

    Joined:
    Jul 4, 2013
    Posts:
    112
    @luispedrofonseca good job! Thanks for the update 2.0
    But I got a new problem. If you remember, I told you that problem when camera is into some other gameObject, and the gameObject is moved(no zero position). Camera had strange offset after starting a game.
    Right now the problem is absent. But I have the same problem in the same cause, when camera tries to follow (ProCamera2DForwardFocus) another object. The offset has returned.

    And 1 more interesting point, It happens just when camera comes in second range in ProCamera2DTriggerInfluence. In first range it's OK.

    1 more problem. Parallax has broken right now too. I guess it could for the same reason (camera is into other gameObject which is moved). Before game starts, background is under the camera, it's so close position. But after start, parallaxed cameras are somewhere but not near to background position. As a result - background is invisible in runtime in a game
     
  17. firebelly

    firebelly

    Joined:
    Apr 22, 2013
    Posts:
    12
    My fault, I called it more than once resetting the animation state and forcing it back to 0f. :) works like a champ!
     
    luispedrofonseca likes this.
  18. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @BAIZOR Yeah, those issues are certainly all related to the fact that your camera is parented. I'd like to get to the bottom of the issue so can you please contact me directly (using support) with a sample project that replicates it?
     
  19. jbarron

    jbarron

    Joined:
    Mar 5, 2016
    Posts:
    1
    Do you have any guidance on how to combine the parallax and repeater features? I have some background objects that I'd like to repeat horizontally - the repeater extension works great for this. However, when I place those objects in different layers and try to use the parallax feature, I get some odd results. I assume the parallax feature is changing the perceived trigger points for the background objects - is there an easy way to adjust this or figure out new repeat points based on the parallax scale?

    Thanks for your help and for creating this great asset.
     
  20. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @jbarron When you have the Parallax extension enabled as well as the Repeater, the Repeater extension should show a new field called "CameraToUse". By default it will use the main one, but you can drag any of your parallax cameras in there. i.e if your repeating object is visible on one of the parallax layers, you should drag the corresponding camera to that field. Let me know if this helped!
     
  21. kmasgrande

    kmasgrande

    Joined:
    Mar 21, 2016
    Posts:
    9
    Totally loving this camera but had a question - it looks like the camera's smoothing effect is linear, but I'd really prefer for the camera to move faster the further it is away from my player. Is there a system for that built in? If not, what could I do/where in the scripts do I look to make that adjustment?
     
    luispedrofonseca likes this.
  22. freedom667

    freedom667

    Joined:
    Sep 6, 2015
    Posts:
    425
    I installed 2.0.0 version but it gives error. Unity Version 5.2.3p1

    Assets/ProCamera2D/Code/Core/Editor/ProCamera2DEditor.cs(43,29): error CS0029: Cannot implicitly convert type `Camera' to `UnityEngine.Camera'

    Assets/ProCamera2D/Code/Core/Editor/ProCamera2DEditor.cs(243,29): error CS0029: Cannot implicitly convert type `Camera' to `UnityEngine.Camera'
     
  23. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @kmasgrande Not sure I understand what you need. Have you tried increasing the smoothness? Can you share an example video of what you're looking for?
     
  24. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @freedom667 You probably have another "Camera" class in your project which is not inside a namespace and it's conflicting with the native Unity Camera class.
     
  25. kmasgrande

    kmasgrande

    Joined:
    Mar 21, 2016
    Posts:
    9
    @luispedrofonseca Maybe theres a term for it that I'm not familiar with - its a bit hard to describe that ‘feeling’. I guess I’m looking for a way to have the smoothness be lower when the target is at the edges of the screen, and higher near the middle? My best guess on how to to that was squaring the effect, but I could be totally wrong about that. I’ll see if I can find a example to send your way.
     
  26. freedom667

    freedom667

    Joined:
    Sep 6, 2015
    Posts:
    425
    But how can i fix this? I couldn't understand. I can't change main camara script codes. I tried convertTo function but it was not in your editor script.
     
  27. freedom667

    freedom667

    Joined:
    Sep 6, 2015
    Posts:
    425
    SOLVED. Thanks for this asset
     
  28. Oab

    Oab

    Joined:
    Aug 16, 2012
    Posts:
    17
    I have a problem with Transition Enter. It work great when I test on iPhone6+
    but It doesn't work on iPad2 (iOS 9.1). Black screen doesn't fade.
     
  29. Krzsiek-Siewiorek-Tate

    Krzsiek-Siewiorek-Tate

    Joined:
    Nov 17, 2015
    Posts:
    15
    It would be nice to have a custom collider on custom Z - for geometry collisions. It would be even nicer, if it would be RigidBody based, so that camera could collide in the classic way - including one way collisions.
     
  30. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @Oab Thanks for the report. I'll take a look at this and see what could be happening.

    @Krzsiek Yes, that's a very good suggestion. Adding it to the to-do list but can't promise a release date at this moment.
     
  31. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    Hello,

    I am using multiple cameras to mimic the effect of 3D layers. Example characters render on top of foreground effects. Is there any way to make all the cameras follow the same zoom/movement of the foreground camera?

    Thanks!
     
  32. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @BlankMauser Not sure I understood your question. Can you please explain further? Are you using the Parallax extension?
     
  33. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    I am using ProCamera2D on a 3d Orthographic camera. With the ZoomToFit extension. I have another camera, that is a child of the main camera, for rendering background and foreground elements separately. However, even though the children camera are following the main camera, they somehow get further and further de-synced. I've changed the hat to a different layer to illustrate what happens:

    https://gyazo.com/29f6c21d31636ac0214ceb76175c4192

    If possible, I'd like all the children camera to sync perfectly with the main ProCamera2D. I'm only using the cameras to make 3D objects render like 2D layers. Any help is greatly appreciated!
     
    Last edited: Apr 2, 2016
  34. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @BlankMauser, if your cameras are simply childs of ProCamera2D they really shouldn't be "de-synching", unless you're doing some kind of position calculations manually.
    Can you send me a sample project that replicates this issue?
     
  35. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    Thanks for the reply.

    That would be somewhat difficult for me. However, I have narrowed down the issue to the ZoomToFit extension. The cameras align perfectly when I do not use it. One camera is merely a child of the main camera, which has the ProCamera2D component + zoomtofit script.

    If necessary I will try and send an example project on Monday.

    EDIT: I think I fixed it by using a small script to update the child cameras Orthographic Size. Hopefully no more issues occur. Thanks again!
     
    Last edited: Apr 3, 2016
  36. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @BlankMauser I just tried it myself and I don't see how could a child of the camera move by itself. In my case it always stays at 0,0,0 like it should. Maybe I'm not understanding what you're trying to do.
     
  37. Lasseastrup3

    Lasseastrup3

    Joined:
    Oct 16, 2013
    Posts:
    16
    Hey there.
    I'm currently experiencing a weird problem where I can't start the TopDownShooter scene. Whenever I press play it seems as if it's about to start but then nothing happens. Can't do anything since Unity is busy, so have to manually close the process. Same when I make a build it displays the Unity splash screen and then nothing happens. Any ideas? It's a completely fresh project using Unity 5.3.3 - haven't imported any other assets
     
  38. Lasseastrup3

    Lasseastrup3

    Joined:
    Oct 16, 2013
    Posts:
    16
    The enemies in the scene didn't have any layers - the field was just empty. I assume that's because the TagManager containing these layers/tag wasn't a part of the package. I couldn't find anything in the readme about this - what should I call them? Could that be part of the issue described above?

    EDIT: Tried disabling all enemies in the scene and it now starts correctly. Any way I can fix this?
     
    Last edited: Apr 5, 2016
  39. Krzsiek-Siewiorek-Tate

    Krzsiek-Siewiorek-Tate

    Joined:
    Nov 17, 2015
    Posts:
    15
    I've got another request for you. There is sometimes a need of using shake extension in continuous mode - not only as a triggered action, ie. like shooting from minigun. There is no easy, ready to use solution for this now.
     
  40. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @Lasseastrup3 Unfortunately a few users are running into that issue (someone complained a few pages back). The way to solve is to recalculate the NavMesh of the level (Window > Navigation > Bake). Sorry about that but I still haven't figured out why it doesn't work for some users.
     
  41. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
  42. Lasseastrup3

    Lasseastrup3

    Joined:
    Oct 16, 2013
    Posts:
    16
    Awesome, that fixed it. However, I still seem to have some issues (hopefully these wont have been covered in the last couple of pages).
    You can see the issue in this small video: https://dl.dropboxusercontent.com/u/1852062/2016-04-06_09-07-37.mp4
    After picking up the first key, the doors aren't opening and when entering the second room the camera goes all weird.
    Any ideas?
     
  43. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @Lasseastrup3 Thanks for the report. Honestly I haven't touched the Top-Down-Shooter demo for a while now. So a few things might have broken with the latest ProCamera2D versions (especially since v2.0 was such a big upgrade). I'll take a look and fix them. Thanks!

    For a better (and simpler) example of all ProCamera2D features, take a look at the Platformer scenes which are all always fully tested before each release.

    Actually, my plan is to, in the future, to have a repository on GitHub with a few sample projects (including Top-Down-Shooter) and only keep the Platformer scenes on the package.
     
  44. Lasseastrup3

    Lasseastrup3

    Joined:
    Oct 16, 2013
    Posts:
    16
    Ok, cool, thanks for your reply. My team is starting a new project which is a topdown game, so we're trying different topdown assets in order to figure out which one to use. I really like yours, so if you think you'll have the topdown implementation fixed not too long from now, we'll stick with it.
    Thanks :)
     
  45. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi there,

    Few questions as i bought some other Parallex Scrolling asset and it didnt work for my case
    - Does it work with Unity UI? Can i parallex scroll an Image Control?
    - Does it only scroll a full background or it can also scroll just a single item. For example i created a sky with 1000x1000 size and i have a cloud of 200x200 and i want that cloud to parallex scroll in 1000x1000 space. This is not possible with other assets as they require a 1000x1000 transparent image with a cloud in it to animate it parallex. So do you provide a feature where we can animate items?

    Thanks
     
  46. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @JohnGate

    1) The Parallax extension works with any object that can be rendered on screen using a standard Unity camera. This includes UI (although I'm not exactly sure what you're trying to accomplish)
    2) The Parallax extension does not provide any methods to "auto-scroll" objects. However, the Repeater extension does allow you to repeat any object (animated or not) within any specified size/distance. This means you can easily create animated / repeating backgrounds that work well with Parallax or non-Parallax cameras.
     
  47. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    I looked at Repearter extension documentation, and it repeats the objects but i couldnt see any x-axis animation related property. Please note that my game is not a platformer, its quiz game , and i want background to animate (clouds in sky). Can you please explain in detail how i can achieve that? i want to be sure before i buy that.
     
  48. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    @JohnGate You're right. The Repeater does not animate anything. It simply repeats an object indefinitely either on the X, Y or both axis.
    However, to achieve something like animated clouds in the sky, you simply have to create an object containing the animated clouds and then use the Repeater extension.
     
  49. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    can u plz add x-axis and y-axis position change over time in Repeater extension so a static cloud png starts moving from right to left, and then jump back again.
     
  50. ParityClaws

    ParityClaws

    Joined:
    Aug 1, 2015
    Posts:
    15
    Is ProCamera2D Cloud Build friendly?

    When trying to build for iOS using Unity Cloud Build I get the following errors:

    1456: [Unity] Compilation failed: 20 error(s), 0 warnings
    1457: [Unity] Assets/ProCamera2D/Code/Extensions/ProCamera2DCameraWindow.cs(5,54): error CS0246: The type or namespace name `IPositionDeltaChanger' could not be found. Are you missing a using directive or an assembly reference?
    1458: [Unity] Assets/ProCamera2D/Code/Extensions/ProCamera2DCinematics.cs(21,52): error CS0246: The type or namespace name `IPositionOverrider' could not be found. Are you missing a using directive or an assembly reference?
    1459: [Unity] Assets/ProCamera2D/Code/Extensions/ProCamera2DCinematics.cs(21,72): error CS0246: The type or namespace name `ISizeOverrider' could not be found. Are you missing a using directive or an assembly reference?

    There is much more but all related. When I build locally for Android or iOS there are no errors.