Unity Community


Page 1 of 16 12311 ... LastLast
Results 1 to 20 of 311

  1. Location
    Oregon
    Posts
    336

    Master Camera: Shooter, Platformer, MMO, RTS, Fighting, and More in Minutes.


    Platformer, Third Person Shooter, Real Time Strategy, Side Scroller, Zoom, Strafe, Toggle to FPS, Object Fade, Wall Collision, Button Look and more. Pick the features you want, leave the ones you don't. Set up your in game camera in minutes.

    The camera is one of the most basic components of nearly any video game. Your players don't spend much time thinking about it, and now with Master Camera, you shouldn't either.



    For older tutorial and breakdown videos take a gander at Master Camera at the Thought Vandal website.




    Change Log:

    Update 2.5.11
    -MCScroll:
    --"Speed" changed to "mouseSpeed"
    --"Scroll Speed" added to effect actual camera movement speed.
    -MCKeyToZoom added - allows the camera to zoom on defined keypress.

    2.5.10
    -Fixed issue with Camera Return Speed and Click To Toggle on MCButtonLook

    2.5.9
    -Added speed variable to the MCButtonLook script to allow smooth movement back to the return position.

    2.5.8
    -Added follow mode "FollowBehind" to keep the camera at the character's back.

    2.5.7
    -Fixed character controller + rigidbody issues.
    -Added ClickToToggle option for MCButtonLook.

    2.5.6
    -Updated MCScroll to be able to turn on and off MeshHiding, as well as Camera Collision, both are now off by default.
    -Added MCZoomPan which allows for the camera to pan a certain direction as the camera zooms / scrolls in or out.

    2.5.5
    -MCLOSFade and MCLOSFadeOther scripts now work with materials that have no color option such as Mobile > VertexLit.

    2.5.4
    -MCLOSFade and MCLOSFadeOther scripts now work with objects where the renderer is on a child object of the collider, and with colliders that have multiple child renderers.
    -MCLOSFade and MCLOSFadeOther scripts now allow defining a string for the "FadeShader" that is, the shader used when fading the object. The default is "Transparent/Diffuse"

    2.5.3
    -MCLOSFadeOther has been added to the "MC Xtra Files" folder. This script can be attached to any object that should trigger Line of Sight Fading for objects on the fade layer. The fading will only happen if the object is in the camera's field of view.

    2.5.2
    -MCButtonLook now has the option to return the camera to position it was in when the button was pushed (Return To On Click : True), or stay where it is currently at. (Return To On Click : False)

    2.5.1
    -MCMouseDampenend now responds to horizontal and vertical angle limits.

    2.5
    -Presets are now #pragma strict.

    2.4
    -Added MCSetView to set the camera to a specific rotation / distance on key press.

    2.3a
    -Added a MultiplayerTracker Prefab/Script to track multiple players on screen.
    -Added FightingDemo Scene which uses Multiplayer Tracker.
    -Added McMouseDampened addon script for dampened mouse movement.
    -Added a Cursor Lock Script.


    2.2
    - Added Presets
    -MCLOSFade script's "Fade" layer no longer needs to be added to the "Collision Layer Mask" layers. This is done automatically.
    -Camera Rotation Mode : None - is now an option.
    -Added RTS Controller

    2.1
    -ButtonLook is now an addon.
    -Renamed several variables to be more intuitive.
    -Horizontal and Vertical Minumum and Maximum Angles now work in "Follow" Mode.
    -Preferred Distance works without needing MCScroll script attached.
    -Added PDF Manual

    2.0
    -Code has been broken up to be modular to minimize the amount of code you don't need in your project.
    -Implemented #pragma strict.
    -Changed LOSFade from using JSArrays to Generic Lists for speed and #pragma strict.
    -Added callable function TestLOS(layerMask) to MasterCamera script. Use this to test for line of sight from the camera to the rotation object.
    -Added callable function StraferSwap() to MCStrafe script. This will swap which shoulder the camera is over per Lypheus request.
    -Bug Fix: Camera no longer tilts in follow modes if euler x rotation is not 0.





  2. Location
    Oregon
    Posts
    336
    Demo link added to main post.


  3. Location
    Toronto, ON
    Posts
    1,901
    Edit: No longer relevant, Tzvier fixed everything.
    Last edited by ArenMook; 12-29-2011 at 10:24 PM.


  4. Location
    Oregon
    Posts
    336
    Thanks for the feedback. I have updated to demo so the options and controls are more obvious.

    The rotation speed is a variable that is easily changeable in the inspector, I have slowed this down in the demo.

    Thanks for the offer of your project, but it seems be a simple smooth follow camera with a click to mouse look option and otherwise lacks nearly all of the features I was looking for, and designed Master Camera to have.

    If you have any more questions, please feel free to take a look at the tutorial videos. They go in depth to explain the functionality of the project.
    Last edited by Tzvier; 12-28-2011 at 11:27 PM.


  5. Posts
    935
    Instead of moving to player when close to wall, can you make the wall transparent? I think for modern games, that is preferred approach.


  6. Location
    Oregon
    Posts
    336
    I can possibly make that an additional feature. Can you name some games I can take a look at for reference? None of the games I have played recently (Assassin's Creed, Skyrim, etc.) go with transparent walls. I'm sure I have seen it, I just can't remember where.


  7. Posts
    29
    I would like this kind of feature too. It is use often in games like Diablo, Baldur's Gate or other game that needs to keep a fix camera angle / zoom. May be Dofus or some other isometric games are using it too.


  8. Location
    Water Valley, AB, Canada
    Posts
    561
    One thing I'm looking to implement on my TPS camera : My character is left or right offset, when I raycast from camera and there is something blocking my view, I'll check from the character and if the line of sight is clear, switch the camera/player positions.


  9. Location
    Oregon
    Posts
    336
    @ Elzean: Ah, so more isometric view type games. Ok, I will see what I can come up with.

    @Lypheus: So, your camera is set over one shoulder, and if line of sight is lost from over that shoulder, you want the camera to auto-switch to be over the other shoulder?


  10. Location
    Water Valley, AB, Canada
    Posts
    561
    Exactly, really I would just support the behaviour with a means of "switching" which side the camera is on and let the developer go from there (i.e. they may tag walls for this to deal with transparencies and things you cannot really account for as a foundation widget/library). Looking at your demo it seems you like have this covered with strafing left or right, it'd be nice to have the feature use a strategy class that we can override for implementing anything specific and then you provide the default of just doing a simple raycast to check for los blockages.
    Last edited by Lypheus; 12-29-2011 at 06:47 PM.


  11. Location
    Oregon
    Posts
    336
    Ok Folks, line of sight object fading on selected layers has been implemented and submitted. The demo has also been updated.

    Lypheus, I'll see what I can come up with.


  12. Location
    Toronto, ON
    Posts
    1,901
    Very nice improvement, Tzvier!


  13. Location
    Oregon
    Posts
    336
    Per user request, the code is now all #pragma strict for iOS compatibility and general speed optimization.

    @ArenMook - Thanks, glad you approve.

    @Lypheus - I'm implementing some basic functions that you could call to produce the effect you're looking for. They are:
    TestLOS(layerMask);
    and
    StrafeSwap();

    The code to implement what you've asked for on a very basic level would be:
    Code:  
    1. #pragma strict
    2. private var strafer : MCStrafe;
    3. private var mc : MasterCamera;
    4. var LOSLayer : LayerMask;
    5.  
    6. function Awake(){
    7.     strafer = GetComponent("MCStrafe") as MCStrafe; 
    8.     mc = GetComponent("MasterCamera") as MasterCamera; 
    9. }
    10.  
    11. function Update () {
    12.     if(mc.TestLOS(LOSLayer)){
    13.         strafer.StrafeSwap();
    14.     }
    15. }

    Does that suit you?
    Last edited by Tzvier; 01-02-2012 at 12:53 PM. Reason: Updated code to reflect changes in v2


  14. Location
    Water Valley, AB, Canada
    Posts
    561
    Ya I think that's a nice implementation.


  15. Location
    Oregon
    Posts
    336
    Update to version 2.0 submitted. Changes include:

    -Code has been broken up to be modular to minimize the amount of code you don't need in your project.
    -Implemented #pragma strict.
    -Changed LOSFade from using JSArrays to Generic Lists for speed and #pragma strict.
    -Added callable function TestLOS(layerMask) to MasterCamera script. Use this to test for line of sight from the camera to the rotation object.
    -Added callable function StraferSwap() to MCStrafe script. This will swap which shoulder the camera is over per Lypheus request.
    -Bug Fix: Camera no longer tilts in follow modes if euler x rotation is not 0.

    New demo uploaded, should function pretty much the same as the previous version.
    New Tutorials to come. . .


  16. Location
    Oregon
    Posts
    336
    It is very difficult to stop implementing cool stuff to make tutorial videos about all the cool stuff that's been implemented.

    Version 2.1 missed being uploaded during the Asset Store downtime, so we're on to version 2.2 now with Presets and a new video to show how they work. A PDF manual has also been added to the project.

    The initial post has been updated.


  17. Location
    Oregon
    Posts
    336
    Update to version 2.3a

    The Asset Store seems to have been having issues lately, version 2.2 set "Pending Review" for a week, so hopefully the 2.3a submission will trip a trigger and get a new version up before I leave the country for week, losing computer access in the meantime. Updates include:

    -Added a MultiplayerTracker Prefab/Script to track multiple players on screen.
    -Added FightingDemo Scene which uses Multiplayer Tracker.
    -Added McMouseDampened addon script for dampened mouse movement.
    -Added a Cursor Lock Script.

Page 1 of 16 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •