Search Unity

Third person cover controller

Discussion in 'Assets and Asset Store' started by EduardasFunka, May 23, 2017.

  1. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
    Wow I'll definitely have to set some time to have a look. Thanks Rahd
     
    Rahd likes this.
  2. xaarrssx

    xaarrssx

    Joined:
    Jul 15, 2017
    Posts:
    2
    Hi all,
    Could somebody tell me how to disable the dust effect that appears while the player is walking?
    Thank you
     
  3. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    I forget which one, but in one of the components, there is a slot for footsteps, and it has a prefab i. It. You can either get rid if that prefab in that slot, or go into the prefab itself and alter it.
     
  4. xaarrssx

    xaarrssx

    Joined:
    Jul 15, 2017
    Posts:
    2
    Thank you! I found the prefab and disabled the particle effect.
     
  5. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    324
    this was addressed twice before , all you have to do is search for the word facing...
    here is the post if you did not find it.
     
  6. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
    Hi, had a couple requests for adding ammunition pick ups...



    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using CoverShooter;
    5.  
    6. public class AmmoPickup : MonoBehaviour
    7. {
    8.     public Gun gun;
    9.     public int bulletInventory;
    10.  
    11.     private void OnTriggerEnter(Collider other)
    12.     {
    13.         if (other.tag == "Player")
    14.         {
    15.             Destroy(gameObject);
    16.             gun.BulletInventory = bulletInventory;
    17.         }
    18.     }
    19. }
     
  7. HonKasumi

    HonKasumi

    Joined:
    Apr 25, 2018
    Posts:
    45
    hello, it looks like you know the asset very well, i dont know where other to ask, maeby you could help,, well i have a third person character, with its controller and ect, all it can do is walk, run, jump, swim, hit soo now i want to impelemt shooting, than i tried this asset, it was great i liked the tps mobile shoting part, but i already have my controller and cant change back, soo i thought is there a possible way just to take only the shooting thing from this asset and implement it to the other one?

    im quite new here, just know some basics but if you know could you tell only which parts should i take and put in my own character
     
    satchell likes this.
  8. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
    I would say yes it's possible. I think you're referring to the animations them selves? I am not skilled enough with the animation system personally to give good insight.

    I'll recommend looking at what Roundbeargames Choi is doing I think there's a github project he's provided with unique interactions.
     
    HonKasumi likes this.
  9. HonKasumi

    HonKasumi

    Joined:
    Apr 25, 2018
    Posts:
    45
    Hmm what i mean is if i could just take the characters shot layer from this asset and combine it somehow with my character, because i dont this this asset character controller, just the shooting is what i like
     
    satchell likes this.
  10. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
  11. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    is this asset abandoned ?
     
  12. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    A bunch of guys here are doing great job contributing to this asset and I'm sure they would continue if it becomes an open source. But @EduardasFunka didn't even had the decency to say something like "sorry but I'm quitting and thanks for everybody who bought it".
     
    Lay84 likes this.
  13. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    Good Day
    Can anyone tell me how to shoot other targets down like a helicopter?. is there any template or something unity sell compatible with TPCS?
    thanks in advance
     
  14. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    anyone integrated objective system and zombie AI ?
     
  15. fabiobh

    fabiobh

    Joined:
    May 28, 2013
    Posts:
    92
    This asset is called "Third Person Cover Controller", but I'd like to know if is it possible to use it as an FPS controller?
     
    satchell likes this.
  16. Dawar

    Dawar

    Joined:
    Dec 7, 2014
    Posts:
    123
    every thing is possible in this world if you have skill you can change it to fps. its not so much difficult
     
    Rahd and satchell like this.
  17. gsmax

    gsmax

    Joined:
    Jun 12, 2018
    Posts:
    15
    It's really sad, if this asset has been abandoned.
    Please has anyone been able to implement Ladder climbing, Swimming and prone ??
     
  18. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Trying to slice animation layers together from 2 totally different animations most likely wont work, unless you have some mad skills. But with that said, you can totally use the animations, even on a separate layer. But I wouldn’t recommend trying to mask in tpcs animations on top of other animations.
     
    satchell likes this.
  19. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Look into the gun script, if i remember right, thats where the damage is called, its not too hard to just add into that, a gun down or integrate with pretty much anything.
     
  20. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    thanks p_hergott can you help me with the camera? when I use the camera script that was giving to me the and place the camera in the back of the character it still wont work. I have it tag as the main camera as in the script. is there and other way to make the player character face the correct direction.
     
  21. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Umm. On the camera, it has the camera script? Have you tried on the player, i believe the inout script, place the camera in the override camera slot ?
     
  22. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    Thanks again p_hergott I appreciate your help. one more thing is there away to switch from game mode to scene mode without the character moving? When I hit ESC the character still moves when going from game mode to scene mode. do you know how to fix.
    Thanks in Advance.
     
  23. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Unfortunately not, best i know is after hitting escape, click on a folder in the project tab, and the player should stop receiving mouse inputs anyways.
     
  24. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    Thanks p_hergott have a very good day!!!
     
  25. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    does anyone know how to create a character selector in TPCS?
    thanks in advance
     
    satchell likes this.
  26. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
    @dnaster You can try this video here...
     
    Last edited: Apr 1, 2020
    Lay84 likes this.
  27. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    Thanks a lot satchell.
    have a good day!!!
     
    satchell likes this.
  28. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    I look at the tutorial and i don't have the character generator for TPCS. I am using TPSC Latest version 1.6.2. with unity 2019.3.7 f1.
    I have created my own Character selector the only thing left is to get the character in the third person camera.
    the character go into the scene when I click the enter scene button, but it don't go into the a third person camera target slot. can anyone tell me how to fix the camera?
    thanks in advance
     
  29. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Maybe in the player script, add a find main camera and set the cameras target in the awake function.
     
  30. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
    @dnaster

    So for this script I'll attach to a UI panel or canvas
    Add UI button and add an OnClick you'll call the PlayGame function from. (Enable and disable different cameras in the OnClick or in the PlayGame function)

    Drag your player and the Third Person Camera to their respective fields.


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using CoverShooter;
    5.  
    6. public class PlayerSelect : MonoBehaviour
    7. {
    8.     [Header("Player")]
    9.     public GameObject player;
    10.     public ThirdPersonCamera tPC;
    11.  
    12.     public void PlayGame()
    13.     {
    14.         //here's the magic
    15.         tPC.Target = player.GetComponent<CharacterMotor>();
    16.     }
    17. }
    18.  
     
  31. satchell

    satchell

    Joined:
    Jul 2, 2014
    Posts:
    107
    @dnaster can you share the code for all three scripts shown in the pic? Might have an idea to help...
     
  32. CrazyLabs

    CrazyLabs

    Joined:
    Sep 24, 2018
    Posts:
    4
    Hi, when is the new update?
     
  33. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day

    just got some new characters and when I put the third person gun in the new characters hand it wont fire. but it does fire in all my other characters hand. can someone tell me how to fix?
    Thanks in Advance
     
  34. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Its likely just a reference point missing. Like from the inventory to the gun. Or the guns themselves not having gunscript?
     
  35. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    p_hergott the gun script is attach to the gun and the weapon still wont fire in the character hand, but it fire in any other character hand. can you tell me how to fix? and can you tell me how to hide the inspector script on the third person cover shooter character.
    thanks in advance
     
    Last edited: Apr 9, 2020
  36. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    On the player, in the inventory portion of it, does it reference the gun gameobject?
     
  37. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    p_hergott yes the inventory script is referencing the gun object. everything is in the normal place. I try it in another player hand and the gun shoot. I have two players that the gun wont shoot when I put the gun in their hand. but all the rest of the players work find with the gun.
    thanks in advance
     
  38. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Well, it cant be the gun, if it does work in “other” hands. In the hands that dont work, do those players walk and jump fine? Does the aimcrosshairs work? (For any of the guns on that player).
     
  39. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    good day
    p_hergott Yes the player that the gun don't work on: can jump, melee, run and draw the weapon it just want shoot or make a muzzle flash nor sound. crosshair works on all the guns I even check the hands of the player the gun don't work on and there's nothing there stopping the player gun from working.
     
  40. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Like to me, it sounds like theres no reference to the gun, from the inventory script. When you equip a gun that doesnt shoot, does it aim and zoom still?
     
  41. lastwinner123456

    lastwinner123456

    Joined:
    Jan 20, 2019
    Posts:
    8
    Hi,I have a question,in strategy scene when I choose a guy with a shotgun, he shoots several times and hides his weapon. How to make sure that he does not hide the weapon.
     
  42. HercDotMe

    HercDotMe

    Joined:
    Sep 27, 2017
    Posts:
    12
    So I bought this asset today. So far it's been a mixed bag. The code is simply a mess and the docs are non existent.

    Regardless, I've managed to get my character working properly (mostly) but have encountered a very strange behaviour with the AI.

    I'm using the prefabs that come with the package, all default settings. Didn't change anything.

    If I set the enemies (AI) to be on the same team but different one from mine, they'll just come near me and either circle, run away or avoid and fight (as it says on their state label) but won't actually even try to attack me.
    If I set the enemies on different sides and completely remove my character from the scene then they all just run away from eachother. They never stop running.

    I have no clue where to even begin looking. Does anyone have any tips as to what might be going on? At 80 EUR, so far this feels like a total rip-off.
     
    Last edited: Apr 12, 2020
  43. gubwe

    gubwe

    Joined:
    Oct 20, 2017
    Posts:
    13
    hie, set your player to "character" (do this as well for the enemies)and leave his team number at 0. then set your enemies to 2 (team number). also watch the tutorial vids for basic setup:
    https://www.youtube.com/user/pukumonas
    but the tags and labels and the team number stuff i mentioned will get them attacking u properly
     
  44. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Ive seen them act similar with no navmesh baked
     
  45. HercDotMe

    HercDotMe

    Joined:
    Sep 27, 2017
    Posts:
    12
    I've watched the videos. All he (the creator) does in them is copy paste components from his presets to the new characters with very little explanation as to what all of those components do.

    I've also tried changing the layers to no effect. Tried to specifically set the team numbers to 0 for me and 2 for enemies and it didn't change anything either. I'm thinking there's a problem with the AI Fighter Brain as if I mess up the layers on purpose the AI acts as if it can't even see me (which is what I wanted) but then when I move the player back on the right layer it just goes back to circling me.


    Ok, I wasn't aware this asset requires a baked nav mesh. I have baked the navemesh and it all works nicely now. The soldier prefab is still only ever running away though.

    Thank you both for your time replying.

    TBH, given my usecase I think I'll just scuttle the asset and extract the animations and animation controller then write my own scripts on top of it. Thank you again for your help!
     
    Last edited: Apr 12, 2020
  46. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Unfortunately ive had to do the same. I love the feel of the controller, but it has issues. When i have time i plan to rewrite parts of it
     
  47. HercDotMe

    HercDotMe

    Joined:
    Sep 27, 2017
    Posts:
    12
    Well, I decided that before I start rewriting I should bang my head a bit more. Got most things working now except the user inventory to which I haven't gotten yet.

    I have the AI behaving correctly, when in my team they help out, when set to enemies they take cover and attack quite nicely. Still, a lot of reading and debugging code was required.

    A weird bug I'm dealing with now is that it seems the inputs passed to the AnimatorController vary a lot when my character is static (somewhat random in values) which is concerning. What's problematic is that in the demo scene my character is 100% static whereas in my scene it vibrates a bit, like there's something wrong with the movement layer. When it's just roaming about, it's fine, however, when in cover, it is really bad.

    I'mma give it till the end of today and if I still can't figure it out I think I'mma start writing my own but I've discovered some issues with the animations as well so ... oh well ...

    Edit:

    The fix for the bounciness was to set my cover colliders to trigger type. Why this was making my guy bounc around even when not in cover I still don't know ...
     
    Last edited: Apr 12, 2020
  48. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Ya, ive had bounce problems, typically from screwing with player colliders
     
  49. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    I found the easiest way to do a inventory, is in the inputs the section that has the input alpa1 cancel gernade() inputweapon(0). Is to break up that section. Like write code and inputs of a inventory, then call the specific alphakey with a different function. Eg. Make a function void weaponswitching(). With a int. Then use more or less a inti switch or compare to select the weaponinput. And get rid of the alphakeys all together
     
  50. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Ok, so, if you make a brand new gun, child it to the players hand, set the reference in the players inventory script. Does a brand new gun shoot?