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

[RELEASED] Cover + Shooting System - Third Person Shooter

Discussion in 'Assets and Asset Store' started by Viniterra, Oct 6, 2017.

  1. Snigros

    Snigros

    Joined:
    Jun 12, 2018
    Posts:
    37
    Thanks for your reply. I have literally just managed to get it to work (mostly!). What I ended up doing was "replacing" the main camera with a state driven Cinemachine (CM) camera which flips between two CM virtual cameras (a default Free Look camera and a Free Look "sprinting" camera). The state driven camera uses the Locomotion and Locomation.sprint_fwd states to trigger an ease in/out between these two cameras. This replaced the code that changes the FOV for the main camera in your scripts.

    As you have suggested, I then used a separate Cinemachine virtual camera (the "aiming camera") which I toggle on or off (with the inverse applied to the main camera) via some minor additions to the AimBehaviour script. A custom blend on the Cinemachine brain (on the original main camera) is then used to cut between the default camera/sprint camera and the aim camera (instead of an ease in/out).

    The aiming camera uses a Transposer on the body with an offset similar to what you used in the original script, and the POV option for the aim. I also use a Cinemachine extension script called RotateTargettoMatch as provided by Gergoryl at https://forum.unity.com/threads/bes...s-style-target-lock-using-cinemachine.606418/. Current behaviour is different to your original aiming behaviour (and not as good yet) - but workable.

    I think Cinemachine is really great (and worth persisting with once you get past the myriad of options!).
     
  2. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    I have introduced myself in some videos about Cinemachine, and it is really a nice tool. It seems to be a great way to make seamless transitions, like the ones in new God of War, Tomb Raider, and other 3rd person action games.

    I'll try to acknowledge it more, so I can be confident enough in the future, to consider changing the camera scripts to Cinemachine effects. Thanks for the suggestion and feedback. It will probably be useful in the future, if I decide to go that way.
     
    Snigros likes this.
  3. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Hi @Viniterra, I'm thinking of picking this up tonight as it seems like the perfect base for what I'm working on, but I had a quick question.

    Are there any features in the pipeline or do you consider this feature complete? Given that it's a few years old, I'm assuming the latter (which is perfect), but figured I'd check incase any breaking changes were on the way.
     
  4. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi, thanks for your interest. This is a mature module, so probably no major features will be added to it. But as a module, there are plans to complement it with other modules that may work independently (ex. enemy AI, melee module) or some sort of dependent modules (ex. explosives, throwables) that will not compromise the way it works now. Either way, this will be separated modules to be acquired.
     
    Acissathar likes this.
  5. XAfgun

    XAfgun

    Joined:
    Oct 2, 2012
    Posts:
    33
    Hello,

    I have problem on pack with this aim position how can I fix it?
     

    Attached Files:

  6. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi,
    You must use the Arms Rotation parameter on the Shoot Behaviour script to align the aim with the projection line.
     
  7. aliiskla800

    aliiskla800

    Joined:
    Dec 10, 2018
    Posts:
    1
    Firstly I wanted to say thank you for the great asset u made (Cover + Shooting System - Third Person Shooter), I purchased this long time ago but I had to quit
    unity for several reasons but I am back now and I have an idea of making a battle royal game for mobile devices kinda like how pubg work
    but I wanted to make sure that your asset will provide me with what I need I have already read a lot of great
    reviews and it really encouraged me and I also tested ur game

    so what I need to know is:
    1-how can I implement Hipfire so the player doesn't have to aim in every time he wants to shoot?
    2-since I am developing for mobiles devices i want to know how can I implement strafe animations instead of rotating
    ?
    3-is there a way to implement scoop instead of regular aim (aim on the shoulder) i want the camera to be above the weapon?
    4-how to control the recoil of the weapon and camera sensitivity?
     
  8. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi, thanks for your acquisition. I have replied you on your earlier contacts trough e-mail and DM about your issues.
     
  9. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    How would i go about adding dual wielding pistols?
     
  10. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    Hi, Viniterra,

    I just picked up your asset (Cover & Shoot), and I'm having some problems that may be tied to Unity 2019. I'm working in a totally empty project that only contains your asset package, by the way (Unity 2019.1.5f1).

    For starters, following your tutorial video, I'm unable to get the character to get into the "aim" position (at ~14 min in your video) in order to position the arms and the Luger pistol.

    A bigger problem, though, is that I'm getting all kinds of NullReferenceExceptions when I try to run the level. The demo level has the same problem: just moving around triggers several hundred identical errors:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.AI.NavMesh.CalculatePath (UnityEngine.Vector3 sourcePosition, UnityEngine.Vector3 targetPosition, System.Int32 areaMask, UnityEngine.AI.NavMeshPath path) (at C:/buildslave/unity/build/artifacts/WinEditor/modules/AI/NavMeshBindings.gen.cs:244)
    CoverBehaviour.DrawPath (UnityEngine.Vector3 destination) (at Assets/Cover+Shoot/Scripts/PlayerScripts/CoverBehaviour.cs:298)
    CoverBehaviour.HandleNavPath () (at Assets/Cover+Shoot/Scripts/PlayerScripts/CoverBehaviour.cs:196)
    CoverBehaviour.Update () (at Assets/Cover+Shoot/Scripts/PlayerScripts/CoverBehaviour.cs:105)

    I'm able to pick up a gun, but it just stays at my side. I can pick up additional guns, but they stay hidden, and the TAB button doesn't do anything.

    When I try to aim, the camera moves to the shoulder position but his arms don't move. No reticle appears, and the weapon doesn't move from its resting position beside the character's hip. Aiming with a weapon causes this error to appear:

    NullReferenceException: Object reference not set to an instance of an object
    ShootBehaviour.AddWeapon (InteractiveWeapon newWeapon) (at Assets/Cover+Shoot/Scripts/PlayerScripts/ShootBehaviour.cs:361)
    InteractiveWeapon.Update () (at Assets/Cover+Shoot/Scripts/LevelScripts/InteractiveWeapon.cs:105)

    I've tried the asset in Unity 2018.3.3, and it seems to work just fine. Do you have any plans to fix the 2019 issues, or am I stuck with working in 2018?

    One last request: One BIG reason I bought the package is to learn how to handle camera / weapon / aim offsets for third-person shooting. My game involves a flyer with a turret on its front end, with a "chase camera" following behind/above its tail (with a slight left/right offset). Naturally, the turret will be pointing to a slightly different place a ray cast from the center of the camera. I simply need a way to align things so that the target reticle in the camera lines up with what the turret "sees" rather than what the camera is pointing at. Any guidance on how to handle that would be appreciated!
     
  11. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi, the way I would start it is the following:

    With the custom animations on hand (you'll need setup them on the animator controller), I would create another weapon type (can be based on SHORT type), that stores 2 gun game objects, it's relative position etc.

    Then, for the shoot action, make some modifications on the shooting script to set the current active muzzle position, alternating between the 2 predefined ones (one for each pistol). The toggle will be triggered on each shot.
     
  12. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193

    Hi, sorry for the delay. For faster answers regarding support, please refer to the contacts present on the asset README file.

    1) I have just imported the package on Unity 2019.2.0 without any issues (no error warnings etc.). I have tested both scenes, time trial and tutorial, and it seems to work as intended. Please update you Unity version and check if you are importing the latest asset version.

    2) I don't know exactly what do you mean, but if you are following the tutorial and when pressing the aim button (right mouse) the character does not enter aim mode, you may have missed some steps on the video, like importing the Inputmanager.asset. Please review the steps on the video carefully.

    If it is not the case, and you are having difficulties to pause the game while aiming, you may use the key sequence Ctrl+Shift+p to pause the game on the editor, without releasing the aim button.

    3) I have tried in many ways to reproduce that error you are getting, without sucess. Only when I manually set te last parameter (path) to null that it seems to get the same error. From what I have noticed, the internal class that is being called (NavMeshBindings.gen.cs:244) is different from the line being called in my try (NavMesh.bindings.cs:202).

    With that said, I would recommend that you check if you have the latest package version. Also, is there a problem to update Unity to a more recent version (like 2019.2.0)? If it is not a problem, please do so and then try it again. Otherwise, please let me know if you have to use that specific version (2019.1.5).

    4) It appears some missed steps on weapon configuration. You have set up all the parameters correctly on the Interactive Weapon script for each gun? Please review that step again carefully on the tutorial.

    5) As I said, I tested it without any issues using the 2019.2 version.

    6) I'll kindly ask you to provide me some illustrated example of what you desire. I suspect that you want some sort of clearance area on center of the camera, where the crosshair moves freely. If it is the case, please let me know.

    If some of the issues still persist, please contact me trough the email support, so I can provide a more detailed help.
     
  13. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Hey any news about the melee system or ai module? i am more interested in melee cause hand combat would be pretty dope.
     
  14. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Thanks for your interest. Right now, I am working on a bundle that will include this asset and the AI module:

    image.png

    This bundle will will be an upgrade asset from this one. The AI module in particular will be sold separately also.
    The melee mode is on track too, probably after this releases.
     
    MLipscomb likes this.
  15. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Damn looking good, do you have a release date in mind for them?
     
  16. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The code will probably be finished this week. Considering the extra documents (setup video tutorial, readme manual), I believe that by the next month (November) it will be ready to launch.
     
  17. deynekos1488

    deynekos1488

    Joined:
    Mar 20, 2019
    Posts:
    14
    Its amazing! Please videotape gameplay, it would be great
     
  18. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Any updates?
     
  19. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello, here are the preview of the package:



    The Third Person Shooter Bundle will include the Cover + Shooting System and the Enemy AI packages. For those who are not interested in the third person shooter controller, the Enemy AI will be sold separately, with the 3 demos scenes featured in that preview. The TPS scene is exclusive of the bundle.

    The bundle package will also be available as an upgrade from both Cover + Shooting System and Enemy AI.
     
  20. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    Is archery (bows and arrows) on your roadmap?
     
  21. stormsurgestudio

    stormsurgestudio

    Joined:
    May 6, 2018
    Posts:
    4
    Please include knife attack combat
     
  22. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The projectile physics is similar to rocket launcher, long range sinper, etc.
    So archery is considered after that, in fact.
     
  23. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Thanks for the suggestion.
     
  24. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Any updates?
     
  25. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    If we buy the
    Cover + Shooting System - Third Person Shooter
    now, will Enemy AI be included in a later update?
     
  26. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Right now I'm finishing the readme manual. After that, I'll create the video tutorial for AI overview and enemy setup. I believe that after these 2 steps, the package will be ready to launch.
     
  27. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello, thanks for your interest. The Cover + Shooting System and the Enemy AI are separated packages. There will be a bundle with the 2 packages included, plus some extras.

    You will have the option to upgrade to the bundle from both packages.
     
    mickeyband likes this.
  28. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    ok, thanks for clarifying. i kinda misunderstood lol
     
    Viniterra likes this.
  29. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Is the package ready? Sorry for the impatience:p
     
  30. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
  31. tyrot

    tyrot

    Joined:
    Aug 18, 2013
    Posts:
    36
    hello there - after reading all reviews about your assets i am also eagerly waiting to buy- i hope there will be an introductory price:)
     
  32. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello, thanks again for your interest. There is no problem at all in asking, don't worry about that.

    Earlier this year I had an unforeseen event that prevented me from working in this project for a while. But that has already been overcome, and I have resumed the activities. Right now, I am concluding the edition of the video tutorial. After that, I believe it will be ready to be submitted in the asset store.
     
  33. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi there, thanks for your interest. The bundle will be offered at a discount, compared to the price to acquire both packages separated. And as I have told above, there will be an option to upgrade from both packages to the bundle.
     
  34. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    If you wanna I would love to buy it before it hits the asset store, then when it’s released I could get a key off you, I’d really love to get hands on this ASAP
     
  35. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    @Viniterra is there a place to contact you for quicker responses?
     
  36. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    For a faster response, please use the support email. You can find it at the end of the readme file that comes with this package (Cover + Shooting System), or in the support link at the asset's page.
     
  37. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Alright, i emailed you! @Viniterra
     
    Viniterra likes this.
  38. RoyaleJoons

    RoyaleJoons

    Joined:
    Jul 28, 2016
    Posts:
    13
    Just bought the cover + shooting system and I am looking forward to the AI module. Thank you for your continued work!
     
  39. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The packages have already been submitted. Right now it is pending approval from Asset Store staff. I'll keep you guys updated.

    Thanks for the support guys.
     
    RoyaleJoons likes this.
  40. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    The asset store need to hurry up and approve it
     
  41. RoyaleJoons

    RoyaleJoons

    Joined:
    Jul 28, 2016
    Posts:
    13
  42. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    We don’t have to pay full price for it do we? @Viniterra
     
  43. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    I own the first pack and it’s showing a price of $20 for the bundle vs the normal $50.
     
    Viniterra likes this.
  44. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Ah yeah now it does, earlier it didn’t weird
     
  45. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi guys, The Third Person Shooter Bundle is finally online.
    Get it here: http://u3d.as/1LDc

    For those who already own the Cover + Shooting System, you can upgrade right now to the Third Person Shooter Bundle, saving 33% off on the second package.

    The Enemy AI package is still pending review by the Asset Store staff, and soon will be available too as a standalone pack. As soon as it goes online, everyone will be able to upgrade from it to the Third Person Shooter Bundle too.

    Both upgrades will grant the access to the bundle exclusive scene, presented on the package preview.

    Hope you enjoy it. Thank you guys for the support.
     
    Last edited: Mar 16, 2020
  46. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Thanks! Just bought it there looking forward to messing around with it!!
     
    Viniterra likes this.
  47. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
  48. Al-

    Al-

    Joined:
    Jun 5, 2015
    Posts:
    26
    Hi,

    Is in the asset or planned to include any save/load system to save character, npcs, pickups and others?

    Thank you!
     
  49. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello, thank you for your interest.

    For simple variables, like the one used by the TimeTrialManager script to recover/store the training times between game sessions, you can use the PlayerPrefs class:

    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

    For more complex systems, take a look at this tutorial:



    Anyway, thanks for the suggestion, it can be handy indeed, I'll consider it.
     
    Al- likes this.
  50. JuJuCoder

    JuJuCoder

    Joined:
    Dec 10, 2013
    Posts:
    30
    how well this would work in mobile?