Search Unity

FX Camera Systems

Discussion in 'Made With Unity' started by ForceX, Jul 10, 2011.

  1. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    wow this is awesome thank you so much for this resource.
     
  2. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Realy awesome,very clear and simple editor interface!
    (now works also on Unity 3.3 )

    Ps. new requests: add a "RUN" function also on RightShift key(for non wasd users)
    add a "Action" function also on Enter key(for non wasd users)
    Thanks
     
    Last edited: Aug 6, 2011
  3. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Sjm Tech: 1. Can you post what you did to get it to work on 3.3 so others that have the 3.3 issues can get them resolved.
    2. Extra functions for non wasd users. Check. Good idea.

    Thanks.
     
  4. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.3.2

    New name: FX Game Development Tools (FX_GDT)

    Changes:
    1. ThridPersonRPG now has custom dynamic mouse cursor support.
    2. Clicking on an interactive object will cause the player to move to the object if it's out of the interaction range before interacting with the object.

    You can check it out here in the updated ThirdPersonRPG WebPlayer DEMO

    Controls: Dragon Age Style
    Move: WSAD or RMB click
    Orbit Camera : Hold RMB (Move mouse)
    Interact: RMB click

    All the WebPlayer Demos on the first post have been updated to the current build.
     
    Last edited: Aug 7, 2011
  5. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    1. To get it to work on 3.3 i did simply follow your suggestion ... to remove "Component" in declaration of variable plus the old bolean problem in EditorGUILayout (remove ", true")
    2. it could be very handy, thanks

    Note:
    - I found a little issue in the demoscene(1.3.2 version ) : the animations of violet door are not been assigned (it can be easy done manually)
    - ThirdPersonRPG: now looks very complete...now only remains a system to fire to the direcion of the cursor position (now fixed on the center of the screen)
     
    Last edited: Aug 7, 2011
  6. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.3.3

    Fixes:
    1. Corrected an issue with the way the weapon hit effects were being instantiated. The issue would occur after the weapon had hit an object but it's next shot would not make contact with any object or terrain. The hit effect would instantiate at the origin of the last impact point. This has been corrected.
     
  7. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Very nice works!
    Thanks for sharing :)
     
  8. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Adapting for Unity 3.3 Users(like me on vacation:D).
     

    Attached Files:

  9. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @SJM Tech: Thanks for your support in helping keep unity 3.3 alive.
     
  10. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    It is a pleasure ... i think that there are many people that continue to use unity 3.3!

    If i can ... i add some notes:
    - it cluld be very usefull if you can add a "targeting range " separated from "Interaction range". In this way it can be identify (by cursor color or texture) the type of action objects at big distance (with no action enabled) and when we go close the cursor change on "interact mode"and now permit the actions.
    - another good feature only for FPS is to simulate the walking camera movement( camera bobbing).
    - a smooth e mouse look (only for FPS i think)(an option like smoth zoom).
    Thanks
    Max
     
    Last edited: Aug 8, 2011
  11. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @SJM Tech:
    1. "Targeting ID range: Ok I see where your going. This is easy enough, the code is in place it just needs an extra if() check for the first person and third person action.
    2. Headbob: I have this working from a previous fps script I created. Should be easy enough to bring it in.
    3. Mouse smooth: I'm not sure about this one. Adding a smoothing effect to the mouse movements would create a delay in start and stop. In action games response is everything. I would have to experiment with this. Perhaps at a very low setting it would be ok.
     
    Last edited: Aug 8, 2011
  12. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    1-2 . Perfect!
    3 - Yes ... for FPS Action Games it must be very low to not create lags (or disabled), but i think to a non game purposes like virtual tour and architectural walkthrough and other purposes near to my real use :) (look my signature)
    Max
     
  13. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    FYI

    If you didn't know this.. To disable cursor lock (RPG mode) check the FX_Game_Mgr script on the FX Player and set to disable. This will allow the mouse to freely move and not be stuck in the center of the screen.
     
  14. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    When I was speaking to RPG controller and shoot system on the center I wanted mean that (unchecking Game Manager option to free the mouse) i can move the mouse freely but if i fire (LMB) the projectile is fired (direction) to the center of the screen (not in the direction of the mouse position or the clicked target ).
    I'm sorry if i don't reach to explain correctly what i mean.
    For do a test...in your demo project, at start (RPG Mode and disabling lock mouse) try to shot a door or any other target in RPG Mode... the projectile is fired in front of the character on the ground (from GUN to the center of the screen)
    MAx
     
  15. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @SJM Tech: :). I understood what you were saying. It got me thinking that some may overlook or not know about it. So I put that out there because it's kinda hidden away and is one of the only features that deals with user controls and is not automated.
     
  16. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi Force, If i can be useful i would to give some my impression:
    - did you think to do the FXCamera parenting to the FX Player? It could be useful to easy move a single prefab in the scene editing.
    - other advantage of camera parenting could be reducing scripting resource to constantly move the "FX camera" (FPS mode) to the "Camera Target 1P" that actualy has a fixed position (a benefit of parenting).
    - make separate (as script) mouselook functions to give the ability to use standard or custom mouselook scripts.
    Sorry if i say things that you has alredy taken in consideration and alredy discharged.
    regards Max
     
  17. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Parenting the camera is something that I do have planed. It will more than likely change .position to .localposition. Which wont cut down on any script calculationsn as you all ways need to calculate for distance and orbit except for the first person mode where those calculations are not required. It will make for an easier way to move the prefab as a whole. At this time I have no plans to break out the mouse input portions.

    The next update will probably be in about 2 weeks as I dont have much time ATM to work on the script this week. I will all ways be checking the forums.
     
    Last edited: Aug 11, 2011
  18. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
    Very cool, thanks!!!
     
  19. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.3.4

    New Features:
    1. Detect objects to be interacted with at a longer distance than the actual interaction range.
    2. While in Third Person RPG mode the weapon will shoot to the mouse pointer location. This mode was not intended for action style games. Some new camera styles will be introduced soon (fixed isometric, Free Action) to more fully support this play style.
    3. Added some controls for direction arrow users. Right Shift: Run Keypad 0: Interact.
    4. FX_Weapon_Linecast has a new setting to alternate the display of the projectile. "Alternate Tracer" this will all the weapon to only fire a simulated projectile (Tracer Round) every X number of shots.
    5. More "Layer" options. 8 = Ignore Camera, 9 = Ignore Camera&Weapon,10 = Ignore Weapon.


    Changes:
    1. Activator settings for doors "Keep Open" have been moved to the door script. This can now be set on an individual door basis. The light option "Keep On" has been removed and will be reintroduced once lights get there own light controller script.
    2. Changed the way projectiles interact with the environment. Raycasting out from each projectile was not enough to cause the projectile to detect a collision. It now calculates a distance time to destroy it's self in the awake function. As a result projectiles should no longer pass through objects at high speeds.
    3. Some minor code cleanup.

    Fixes:
    1. While in Third Person Action mode when switching from the cameras secondary position back to the primary position it will now set the cameras distance back to that of what it was before entering the secondary position.
     
    Last edited: Aug 12, 2011
  20. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks ... big update!
    I'll give a look at soon.
    For now i did fix compiling errors for Unity 3.3 users.
    kind regards
    Max
     

    Attached Files:

  21. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Very good release, i found only few things that could be improved!
    - add also an "Detected Color" along with "Default color" and "interactive color".
    - Keypad 0 interact key don't works on "Door" and "Interactive" tagged objects.
    - in could be useful add an option to display the name(GuiText) of detected gameobject
    - add a option to enable weapons to follow the camera direction ( on Y axis). I obtained what i mean (only for testing) parenting "A_Gun" to FX Camera instead to FX Player (so, obviously, the firing system works only with a code edit and only for FPS camera mode)
    Max
     
    Last edited: Aug 12, 2011
  22. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Sjm Tech: Thanks for your continued support and feedback through this development process.

    1. Detect color: k
    2. My mistake i only applied the code to the activator object a fix will uploaded in a few minutes.
    3. Weapon Y Lock.

    This will be implemented with the isometric camera mode. I have something which i think will be cool for the Free Action mode well have to see how it turns out.
     
  23. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.3.4b

    Fixes:
    Keypad 0: should now work for all interactive object classes.
     
  24. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    thanks to you for your fast and creative development!

    Added two screenshoots to best explain my precedent post (last point)
    Max
     

    Attached Files:

  25. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Sjm Tech: My mistake for some reason i was thinking of something totally different. For first person something like this would be ok since it would not require any custom animations, unless the full actor body is rendered.
     
  26. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    yes i understood... the question is that i'm focalizing my first interest to the FPS camera mode. It is the camera mode that i prefer and the only system that i did try to expand in my projects.
    It is the cause that make me speaking by thing that are not usefull in other camera mode.

    I add what i would to have in a complete controller (FPS first of all).

    - Walking sound (different for type of surface)
    - Head bobbing movement(FPS)
    - Weapon bobbing movement (FPS)
    - FPS Weapon follow camera direction (FPS)
    - Make a single prefab.
    - Add an option to smooth the mouse look movement
    - Add in the crouching and prone status a real Character controller height variation (collider and camera position)(FPS)
     
    Last edited: Aug 13, 2011
  27. zine92

    zine92

    Joined:
    Nov 13, 2010
    Posts:
    1,347
    Just found this. Going to check it out now.:D
     
  28. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    little issue for "direction arrow users ":
    - when player runs and if Keypad0 is pressed, the Player's status switches to normal walking.
     
  29. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    That's strange. Keypad0 should not effect the motor script in any way. I'll have to check it out this evening.

    Thanks
     
  30. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Strange...it doesn't occur replacing "Keypad0" with "Return" key (for example).
     
  31. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    WOW as it turns out if you hold down shift then the numbad arrow keys can be used as your direction keys. But it seams all the keys on the numpad will cancel out the effects of holding the shift key. Very strange..
     
  32. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.3.5b

    New Features:
    1. FX_Weapon_Linecast has a new option: "Align Weapon To Camera" This will allow the weapon to follow the cameras up down orientation.
    2. Detect interactive objects that are out of interaction range but within the detect range can now be assigned a color.

    Changes:
    1. FX_Player FX_Camera have been made into one prefab object.
    2. First Person Action: Uses a much more efficient scripting for it's camera position and rotation thanks to parenting has all inputs fully updated inside of Update.
    3. Third Person Action: Now updates the PlayerController rotation inside of Update instead of LateUpdate.


    Updated Web player Demos on the first post to current build.
     
    Last edited: Aug 14, 2011
  33. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    WOW... great added features ... this is a very interesting release... i'll give a look tomorrow (now in italy we are on midnight :D).
    Thanks for your professional developement.

    max

    p.s. this is for Unity 3 users
     

    Attached Files:

    Last edited: Aug 14, 2011
  34. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi ForceX, i test this release and it seem quite perfect!

    To follow the philosophic of the single prefab (drag and play) i think that you could you try to replace the gui_reticule prefab drag with a runtime Instantiate version (no gui retucule public variable request that is the only FX Player's manual variable insertion).
    In this way only weapon prefab, if needed, can be manually added.

    The very best thing could be to make an option like "Add Weapon" to add the Wapon prefab in the right way in one click.

    Great tool... I found it very handy and could be the perfect replace of the standard controller prefab.

    Thanks
    Max
     
  35. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @SJM Tech: That's a good idea for the GUI reticule I'll have to do that. The weapons will be part of a larger player stats and inventory system that I'm going to start working on. I really wanted to wait for the new GUI system in unity 3.5, but I can start work on the array structures till then. First I still need to finish off the FPS mode by including options for headbob, weapon bob, crouching, prone, then a climbing system for all action modes. So I got plenty to do till U3.5 :)
     
  36. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    fantastic news... i can wait to see all features together.
    Good job
    Max
     
  37. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi ForceX, i was testing your FX door (specially Hinge tipe) and i was thinking that it can be nice if it could add a option to select the "Door Pivot"(like a empty gameobject) for an easy door opening configuration.

    Another nice feature it can be the ability to avoid that the weapon going inside other object. A solution could be that the weapon begin to pointing down when colliding with the other objects and then back in the standard position when object are quite distanced.

    Max
     

    Attached Files:

    Last edited: Aug 16, 2011
  38. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Sjm Tech:

    1. Door: That is an option but my real intent was that a door will be a custom geometry and the pivot will have been placed during asset creation prior to importing into unity and not just a unity cube that's been re sized.

    2. Weapon : The most common solution is to render the weapons on it's own layer so it's all ways rendered over everything else. But as you pointed out you can use a script based solution as well.

    At this time I plan on letting these decisions be made on a per project basis.
     
  39. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Service Release 1.3.5c

    Fixes:
    1. For direction arrow users Interaction Key "Keypad 0" has been changed to Return/Enter. This fixes the problem while holding down the shift key and pressing any key on the keypad; this would cause the effect of holding shift to run to be canceled out.

    Changes:
    1. Demo gun now has a prefab.
    2. Added new layer 11 = "Ignore Interact" This is a special case ignore layer.
     
    Last edited: Aug 16, 2011
  40. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi ForceX, I understand your objective and thanks for your Tips.

    Max


    last version for Unity 3:
     

    Attached Files:

    Last edited: Aug 16, 2011
  41. daywin

    daywin

    Joined:
    Jul 13, 2011
    Posts:
    9
    thank ForceX Sjm Tech ,You are super pro-gamers
     
  42. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks daywin , but all thankses go to ForceX and his nice tool!
    I make only some request... ForceX spend his time to make it real!
    Regards
    Max
     
  43. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @daywin: Thank you and welcome to the unity forums. I'm glad you like the scripts. If you have any issues or suggestions please post them here and I will do my best to help. Check back often as the scripts get updated with new features and fixes at least once a week.
     
    Last edited: Aug 17, 2011
  44. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Update 1.3.6

    This is kind of an experimental release.

    New Features:
    1. GUI Weapon Camera: This camera handles the rendering of the onscreen GUI elements and weapons in a higher depth order.
    2. New layers 12 = Render Weapon, 13 = Render GUI

    All GUI elements should be set to layer(13) "Render GUI"

    You do not have to assign weapons to the "Render Weapon" layer(12). If you do read the following.

    The new "Render Weapon" layer(12) will require manual activation at this time. If you are designing a game where the player can drop weapons and items to the ground then you will want to set it's layer to "Default" while on the ground. If not then the item/Weapon will render through every gameObject on the screen. When the player picks up and equips the weapon then you will want to change the layer to the "Render Weapon" layer(12).

    !!!!IMPORTANT!!!! Setup your layers to be:
    8 = Ignore Camera
    9 = Ignore CameraWeapon
    10 = Ignore Weapon
    11 = Ignore Interact
    12 = Render Weapon
    13= Render GUI

    Changes:
    1. ActiveReticule GUITexture is now generated automatically and no longer requires the asset to be applied in the inspector.
    2. FX Camera Check Points GameObjects are now generated automatically and no longer required in the prafab.
     
    Last edited: Aug 18, 2011
  45. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    thank you, I will try soon!

    Unity 3.3 Fix.

    Max
     

    Attached Files:

    Last edited: Aug 18, 2011
  46. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi ForceX, very good version (fantastic automatic settings features)!
    I post only some notes and wishes:
    - there is no more the option "Visualize Camera Debug " for FPS Style.
    - the "interaction color" it could be disabled for object with separated Activators (no action is really avaible)
    - togheter to "headbob, weapon bob, crouching, prone, and climbing" it could be nice to add a swiming, weapon kickback and Lean left and right controlls.
    Regards
    Max
     
  47. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @SJM Tech:
    1.Objects with Activators. I was thinking of a display message that would say something like "This object is controlled else where".. Or something.

    2. FPS Debug. Oops didn't mean to disable that.

    3. Weapon recoil. Look for that sometime this weekend.

    4. More action states will be coming. :)
     
  48. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    awesome...i can't wait to see your upgrade!

    Max
     
  49. daywin

    daywin

    Joined:
    Jul 13, 2011
    Posts:
    9
    ForceX your Webplayer Demos paste in dropbox ?? I would like same , I paste floder "Webplayer" ,How to get Url?
     
  50. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @daywin: to create a url do this..

    Get Your Dropbox URL.
    1. Navigate to the file you want to use for your URL
    2. Right click on the file icon and select Dropbox ----> Copy Public Link.

    Create The Hyper Link
    1. Type something like "Play HERE"
    2. Select "HERE"
    3. Click the icon "Insert Link" it looks like the earth with a chain link at the bottom.
    4. Paste your URL in the new text field.
     
    Last edited: Aug 20, 2011