Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Master Camera: Scroll/Zoom, Strafe, FPS-3PS Toggling, Minimal/No Clipping and More

Discussion in 'Assets and Asset Store' started by tzvier, Dec 8, 2011.

  1. rezilausiv

    rezilausiv

    Joined:
    Nov 18, 2010
    Posts:
    126
    To give somebody a look into the own workstation with a remote tool like teamviewer that we don't know needs a lot of trust and must follow a logic strategie, which both not exist right now, sorry.

    I mean, what do you want to see what we can telling you too? It is Unity running on OSX 10.6.8 with only load your MasterCamera package that produces some errors (see above), as long as Unity is set to either iOS or Android as platform.

    This means that MasterCamera can't be used for mobile projects made with Unity 3.x MAC.
     
  2. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    I understand your hesitation at granting someone remote access to your computer, which is why I use teamviewer. When someone connects to my computer using teamviewer, I know that I can shut down the connection at any time. I know that they can only do, and only have access to what I can see on my screen. I still have control of my computer, even if I allow remote control access.

    Let me explain why it is important, if you want a solution, that I see the issues you are having, in the environment that you are having them. When someone is having an issue, sometimes there are likely causes, and I can suggest solutions through the forums. In this case, the solutions I have suggested did not resolve the problem.

    The issue you are having is caused by something I do not understand. So, all I can do is look at the situation for things that do not look right. I need to be able to look for things that are not as they should be, and I cannot imagine all of the possible scenarios that would cause these issues. All I can do is investigate on what seems out of place.

    What I cannot do is maintain access to every device, OS, and Unity version to recreate issues seen by individual users. If an problem comes up, I am happy to look for a solution. If the problem is not isolated to a specific user, I will release an update to the package.

    I hope that this all makes sense.
     
    Last edited: Mar 23, 2013
  3. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    Just tried Master Camera with 'Unity 4.1.2' and discovered that the camera has no collision and passes through walls in the Demo. Am using the latest version of MC.
     
    Last edited: Mar 31, 2013
  4. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Check that "Enable Camera Collision" is enabled on the MCScroll script.
     
  5. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    That got it working, thanks.

    Has anyone been able to use Master Camera in a Multiplayer project?
     
    Last edited: Mar 31, 2013
  6. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Out of the hundreds of sales of MasterCamera, I have only been made aware of a small handful of specific projects which use it. While none of those few are multiplayer games, MasterCamera most certainty be used for multiplayer games. If it's multiplayer over a network, then you would use it as normal. If you are talking about multiplayer on the same screen, take a look at this video.
     
  7. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Thanks for the addon, after watching the three setup videos I was able to get the isometric camera working within a couple minutes with the preset, no hassle and no fuss. Looking forward to really tweaking this but already a great starting point for my project.
     
  8. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Great! Glad to hear it. If you have any issues or suggestions let me know.
     
  9. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Is it possible to create an Isometric Camera ?

    Does this work with Flash?
     
  10. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Yes, you can create an Isometric Camera. I don't see any reason why it wouldn't work with Flash.
     
  11. Unity3dteacher

    Unity3dteacher

    Joined:
    Dec 14, 2012
    Posts:
    197
    very nice !
     
  12. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi tzvier,

    I have thought of 2 interesting suggestions for MC which I require for my project:

    1) Continuous Camera Rotation Script - I was thinking of being able to trigger a camera rotation at a certain speed/angle with a boolean, for example when the player dies the camera is triggered to begin a slow, continuous spin around them.

    2) Camera Shake Script - self explanatory I think, basically a way to trigger a camera shake with some variables to control the shake, eg shake amount, shake vertical, shake lateral etc

    Both of the above could be done by animating the camera, but I think it would work better to script it so that the effect can be tweaked and then easily applied to any other MC. Please let me know your thoughts.
     
  13. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Thanks Hamesh. I will consider it and see if I can come up with something.
     
  14. GamesByJerry

    GamesByJerry

    Joined:
    Oct 27, 2008
    Posts:
    71
    I had a look through this thread and was surprised to find no mention of keyboard movement ( WASD to pan and Q/E to rotate ). I did up a basic script that supports the RTS boundaries but honestly thought this would be a staple for an RTS camera? Anything official on the cards? If not I'll work on polishing up my script and share it, feel it's really the one major thing missing from this awesome asset!
     
  15. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Hi Tzvier,

    I have a question about the demo. http://thoughtvandal.com/MasterCamera/MasterCameraPreview.html

    As an example:

    In the demo when the character is facing left , the camera is targeting his left side.
    If I press the left arrow key, the character is walking in a circle.

    So instead of walking in a circle, is it possible to make him walk " to the Left Direction" and the camera is following along still targeting his left side. The effect of this looks like a Side Scroller Game.

    Question: How to set up the keyboard controls and the camera so that when the character is facing left/right, we can make him walk in that direction instead of turning in circles. The front and back direction remains the same as in the current Demo.

    Thanks.
     
    Last edited: Apr 29, 2013
  16. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Jerry, You can get that functionality by setting up a camera with a rotation mode of MouseHorizontal, then go to Edit > Project Settings > Input, and make the changes indicated in this picture:
    $KeyboardSetup.png




    ---------------------------------------------------------------------------------------------------------------------

    rocki, in this instance, when would you like the camera to rotate?
     
    Last edited: Apr 29, 2013
  17. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Hamesh, I've complete a continuous rotation script which I will include in the next update. As far as camera shake, there exists a solution for that already. Thinksquirrel has a Camera Shake asset, which seems pretty good. I don't have it myself, but the demo shows it to be full featured including shaking the GUI, which is not something I'd likely implement.
     
  18. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Can we make the camera rotate when the user hits the space bar. Is this all that would have to be changed to get the behaviour that we need.
     
  19. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Yes? Follow the same instructions as Jerry, and make either the positive or negative button "space" (no quotes), and I think that will give you what you are looking for.
     
  20. trajan

    trajan

    Joined:
    Mar 10, 2011
    Posts:
    6
    Hello Tzvier,

    Can I download MasterCamera somewhere without having to upgrade to Unity 4?

    I have an old project on 3.5.6, but would like to update the MasterCamera package in it.

    -T
     
  21. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Yessir : thoughtvandal.com

    You can purchase it there and have access to the last version that was compatible with Unity3.5, or if you have already purchased it through the Asset Store, send me your order confirmation number and I will set you up with a 100% discount for MasterCamera at the thoughtvandal store.
     
  22. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Hi tzvier and hi all,

    I need of a camera built in this mode: a platformer game side scroll with the camera follows the player character, when the character trigger some areas or zone (customizable) of the platforms the camera rotate 90 degree left or right (customizable) then continue to follow the character in the same side scroll but with the platform rotated. And so on...

    I need to customize all of these points above, so can i make these settings with your script? I must modify the scripts to obtain that or not?
    Thanks in advance.

    -Kafar
     
  23. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Sure,

    Put the following script (or something like it) on a collider with "Is Trigger" enabled.

    Code (csharp):
    1. #pragma strict
    2.  
    3. var rotateTo: float = 90;
    4. var turnSpeed: float = 1;
    5. var masterCameraRig : MasterCamera;
    6.  
    7.  
    8. function OnTriggerStay (other : Collider) {
    9.     if(other.tag == "Player"){
    10.    
    11.         masterCameraRig.rotationObject.transform.localEulerAngles.y = Mathf.LerpAngle(masterCameraRig.rotationObject.transform.localEulerAngles.y, rotateTo, Time.deltaTime * turnSpeed);
    12.     }
    13. }
    14.  
    that would be the quickest way to accomplish what I think you are looking for.
     
  24. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Thank you very much!

    -Kafar
     
  25. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Hi Tzvier,

    I bought your MasterCamera to implement my scenario I described you above. A question: I saw some settings and some scripts but no documentation about these. There's docs or there's only 3 video tutorials?

    I need to set the camera to follow the player only in horizontal and vertical.

    Thanks

    -Kafar
     
  26. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    There is a .pdf included that goes over most of the scripts and their functions.

    I'm not sure what you mean by, "follow the player only in horizontal and vertical." Do you mean no camera rotation?
     
  27. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    I'm sorry but I saw in Master Camera folder only, not in Asset root.

    About my scenario, it's a side scroll platformer and on some zones I rotate the camera to simulate the platform rotation, then continue the side scrolling.
    Thanks

    -Kafar
     
  28. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    I believe if you set your Camera Rotation Mode to "None" you should get what you are looking for.
     
  29. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Great to hear, I look forward to it. And no I didn't actually mean GUI shaking functionality, just the camera shaking. But it's ok since I've found a free script for it online already, here it is for anyone else looking for the same thing:

    http://www.mikedoesweb.com/2012/camera-shake-in-unity/
     
  30. ThatChaos

    ThatChaos

    Joined:
    Mar 29, 2013
    Posts:
    12
    I'm having problems with the MCFOSfade, It doesn't seem to be making anything transparent. I have set everything that I want to be faded to a Fade layer but that doesn't work. Even when it is set to fade everything nothing seems to work.
     
  31. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    I sent you a PM ThatChaos.
     
  32. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    ThatChaos's issue has been resolved. It came down to purchased environment assets not having colliders set up.
     
  33. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Hi,

    Just started to integrate MasterCamera into the project and have a question about how to get
    MCscroll working with MCmouseDampen.

    It seems that when MCmouseDampen is added, MCscroll stops working.

    Thanks.
     
  34. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Sent PM
     
  35. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Hi Tzvier,

    I added and removed and started fresh again and it's working for now.

    I noticed that everything is in JS, is it possible to have a C# version of MasterCamera?

    Thanks.
     
  36. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    I'm testing the rotation of one object using MC without any Addons, and CameraRotationMode: MouseHorzVert

    On the Ipad, when I touch the rotate the object, the object is rotated to a certain angle. I then take the finger off the screen. Then when I place my finger on the screen to rotate the object, it jumps to some other angle abruptly.

    What I would like for it to do is that when I put my finger on the back on the screen, it should not jump, it should start rotating from its current rotation. This behaviour is quite basic to touch devices as when we put our finger on the screen we expect the object to not jump to some unknown place, it should move from smoothly with our finger from its current position. Perhaps there is a setting somewhere that I I missed.

    Thanks.
     
  37. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Sorry rocki, there are currently no plans to translate MasterCamera to C#.

    As far as the camera jumping, can you use CameraRotationMode: None, and MCButtonLook with "Return To On Click" set to false, for responding to your finger movement?
     
  38. Aasmund

    Aasmund

    Joined:
    Mar 20, 2013
    Posts:
    8
    Hi!

    First, thanks for developing such useful asset :D

    But when I assign my character to the game object in Master Camera it bounces back to the egde of my terrain. It works fine without the character.
    Here is what I mean:

    (The game-window is on a second monitor)
    $MasterCameraIssue.jpg

    I don`t know if this could be a issue with the last version of Unity? I have tried different layers/tag settings but nothing works there either.
    Hope you can help me out!
     

    Attached Files:

    Last edited: Jul 10, 2013
  39. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Aasmund, it looks like you don't have a character object. You need to have a "Player" object for MasterCamera to follow.
     
  40. Cronos000

    Cronos000

    Joined:
    Nov 27, 2012
    Posts:
    3
    Hey,
    I got the camera working however when the player starts going too fast it starts jerking around a bit. Is there a known fix for this?
    Thank you
    Zac
     
  41. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Cronos, try adjusting the MasterCamera.js > Smooth > Location variable.
     
  42. Kumite

    Kumite

    Joined:
    Apr 29, 2013
    Posts:
    3
    First let me say this is a great product! I followed the tutorials and had my MasterCamera running in minutes. :grin:

    I'm looking for a little advice most likely due to "newbie" rather then product. I have my MasterCameraRig in place and the app runs with the camera moving with my character. Nice! I have my character "Bip01" added to Player on the Master Camera (Script) on the MasterCameraRig so the camera follows as expected.

    I've read the forum and watched the videos, but am still a bit confused about the configuration:
    Visual object location:
    - As I have the "Bip01" added, what is the best practice for getting the MC.LocationAdjustment markers to align with my character in the editor.
    - When I run the app, everything snaps in place as it should. But it's tough to fully position other elements without seeing the alignment of camera targeting.

    Vertical Camera control:
    - I can use the arrow keys (Left Right) or "a" and "d" to rotate the camera horizontally around the character.
    - I cannot use the arrow keys (Up Down) or "w" and "s" to rotate the camera vertically around the character
    - My InputManager appears correctly configured for Horizontal and Vertical

    Character Scripts:
    - Do I need any of the ThirdPersonCamera or ThirdPersonController scripts on my "Bip01" (character)?
    - It appears to work without, but I am concerned that my flaw is with the targeting in that the pelvis is determined but a script is missing.

    Thanks for any thoughts contributed.
     
    Last edited: Jul 26, 2013
  43. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Kumite, Thank you for your purchase!

    To most accurately adjust MC.LocationAdjustment, I recommend:
    1. Dragging and dropping the entire MasterCameraRig onto your Player object.
    (This will make the rig a child of the Player for the moment.)

    2. Go to the Transform properties of the rig and zero out the now local position and local rotation.
    (This will center the rig to the Player)

    3. Drag the rig back out of the Player hierarchy, so it is no longer a child.

    4. Use the scene view to move the MC.LocationAdjustment as needed.

    As far as vertical camera control, I assume that you are in Follow mode? As such the camera automatically moves horizontally not specifically because you are pushing 'a' and 'd' but because it is trying to stay behind the player. In this case, pushing 'w' and 's' does not move the camera vertically because that would cause the camera to move up as the player walks forward, which doesn't make sense. Unless there is something that I am missing and you can elaborate on this a bit?

    You do not need the ThirdPersonCamera when using MasterCamera. If you want to move your character I would assume you want ThirdPersonController unless you have another character controller.

    Hope that helps!
     
  44. Kumite

    Kumite

    Joined:
    Apr 29, 2013
    Posts:
    3
    Tzvier, Thanks for the response. I was trying to be brief and it backfired with lack of clarity on what I am attempting to configure. Sorry!

    Your recommendations helped a great deal.

    Yes, I am in Follow mode.

    I essentially want the camera to follow the character, but the user must be able to control the camera position within a limited imaginary "sphere" around the character. Initially my camera starts facing the front of the character (my default view). The user should be able to control the camera horizontally (around the character 360), vertically (up down should change the angle of view within limitations), and zoom in out (again within limitations). The camera "sphere of control" will follow the character. The camera position within the "sphere of control" is handled by the user. This concept places the focus on the character motions

    The following works as does the horizontal camera movement (in full 360). Having a little issue connecting the dots for the vertical (angle) control and the zoom (I need to work with the MCScroll to zoom I believe but haven;t touched it yet).

    Thanks!.

    The character is actually controlled by motion capture data. The MoCap data is in place, plays, and the camera follows it well. If I use the 'a' and 'd', the camera does rotate around the character on the horizontal plane.
     
    Last edited: Jul 26, 2013
  45. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Are you looking for the functionality of Camera Rotation Mode > MouseHorizontalAndVertical, but using keys instead of the mouse?
     
  46. Kumite

    Kumite

    Joined:
    Apr 29, 2013
    Posts:
    3
    I've been playing with that this afternoon. Looks like I simply need to stop rushing it and give myself time to absorb all you've put into this. The MouseHorizontalAndVertical option does indeed do what I need. I need to simply take the time to learn what I'm doing with it. I'll have to enable/disable the mouse input based on the mode of the app. I was using keys as it gives me better control on the ol' laptop while I'm traveling developing. Input would be keys or mouse in Windows, on any tablet/mobile device such as iOS or Android I'd use screen swipes with pinch to zoom.

    Thanks for your response. (FYI - Shown a few colleagues the rapid deployment of MasterCamera and they have all been astounded by the simplicity. Kicking ourselves for not buying it sooner!)
     
  47. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Haha, ok. Let me know if you run into any more walls.
     
  48. MrAdventure

    MrAdventure

    Joined:
    Aug 22, 2012
    Posts:
    28
    Hello,

    This is a great purchase, I had the RTS camera up and running very quickly after watching the new tutorial, which I recommend highlighting in the asset description. Also, I don't think the asset description lists RTS, which is what ultimately made me buy it.

    On to my questions, I am trying to get rotation working with the RTS Preset. I followed the instruction you gave two pages ago (pg 11) about changing rotation mode to MouseHorizontal and changing Mouse X negative and positive buttons, as well as setting type to Key or Mouse Button, but nothing is happening on the rotation front.

    Finally, I'd like to be able to zoom in and out with the mouse wheel, and use WASD or arrow keys to move as if the mouse was at the edge of the screen. Are these possible?

    Thanks for the help,

    Victor
     
  49. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    MrAdventure,

    Check the main MasterCamera.js script. Look at the Horizontal > Minimum Angle and Maximum Angle. If you want 360 degree horizontal rotation, the Horizontal > Minimum Angle should be -360 while the max should be 360. You can play with the Vertical > Minimum and Maximum values to suit your specific needs.

    Let me know if that helps!
     
  50. MrAdventure

    MrAdventure

    Joined:
    Aug 22, 2012
    Posts:
    28
    Hi tzvier,

    That worked like a charm, thanks for the prompt reply. Getting one step closer to done brought up a couple other things.

    I am not sure, but I think you might save yourself a lot of question answering time with some documentation. I apologize if there is some that I missed, all I saw was the videos. The reason I say this is because I'm trying to add a few more features to my camera, and I can't tell if they are already ready in scripts. For instance, I did just MCScroll for mouse wheel scrolling, but I would also like to press the middle mouse and then move the camera horizontally and vertically. Even some plain English comments in each script would help a lot.

    So far this is a great asset, it's been really easy to set up and I appreciate it. If you could help me with that middle mouse look that would be great.

    Thanks,

    Victor