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

Third person cover controller

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

  1. lastwinner123456

    lastwinner123456

    Joined:
    Jan 20, 2019
    Posts:
    8
    upload_2020-4-15_9-45-26.png

    why switcher between characters does not work?
     
  2. raziel786

    raziel786

    Joined:
    May 6, 2014
    Posts:
    22
    I have a problem with the "left hand default". Everytime I assign it with default "LeftHand" GameObject defined in the weapon i.e. rifle, it causes my characters left hand to shake. This seems to happen to every gun i assign to my character, whether its pistol or rifle. Help? @EduardasFunka
     
    Last edited: Apr 15, 2020
  3. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    I have used the third person cover scene as my starting point. I have flattened the terrain and lowered it below my roads and footpaths.
    I created an empty "cover assets" and placed all but the terrain and cowboy and main camera into this place.

    The plan is to build a small section of my city and then test out the Ai around and inside the buildings.

    Question: would you possibly recommend a different approach?

    You can see a demo here:
     
  4. BettoSan

    BettoSan

    Joined:
    Dec 7, 2017
    Posts:
    57
    I was working normally on Unity2018.2.21.
    Due to bugs in other apps I updated to Unity2018.4.21.
    Everything works, but the character walks without moving.
    I created a New Project and downloaded only the "Third Person Cover Shooter Template", and the same happens.
    I've searched for the error for everything, I didn't find it :(
    Does anyone know how to indicate a path for this fix?
     
  5. BettoSan

    BettoSan

    Joined:
    Dec 7, 2017
    Posts:
    57
    Trying to place the Total Ammo in the Inventory.
    This Script is inserted in a Text on Canvas.
    But I think it needs some modifications.
    If anyone has any ideas, I'm starting.

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3.  
    4. namespace CoverShooter
    5. {
    6.     /// <summary>
    7.     /// Maintains information about the gun and it's ammo.
    8.     /// </summary>
    9.     [RequireComponent(typeof(Text))]
    10.     [ExecuteInEditMode]
    11.     public class MunicaoTotal : MonoBehaviour
    12.     {
    13.         public Gun gun;
    14.  
    15.         /// <summary>
    16.         /// Character whose gun information is displayed.
    17.         /// </summary>
    18.         [Tooltip("Character whose gun information is displayed.")]
    19.         public CharacterMotor Motor;
    20.  
    21.         /// <summary>
    22.         /// Determines if the display is hidden when the motor is dead.
    23.         /// </summary>
    24.         [Tooltip("Determines if the display is hidden when the motor is dead.")]
    25.         public bool HideWhenDead = true;
    26.  
    27.         /// <summary>
    28.         /// Determines if the display is hidden when there is no gun.
    29.         /// </summary>
    30.         [Tooltip("Determines if the display is hidden when there is no gun.")]
    31.         public bool HideWhenNone = false;
    32.  
    33.         private Text _text;
    34.  
    35.         private void Awake()
    36.         {
    37.             _text = GetComponent<Text>();
    38.         }
    39.  
    40.         private void LateUpdate()
    41.         {
    42.             if (Motor == null)
    43.                 return;
    44.  
    45.             var Gun = Motor.Weapon.Gun;
    46.             if (!Motor.IsEquipped) gun = null;
    47.  
    48.             if (gun != null)
    49.                 _text.text = gun.BulletInventory.ToString();
    50.             if (Application.isPlaying)
    51.             {
    52.                 var isVisible = true;
    53.  
    54.                 if (Motor == null)
    55.                     isVisible = !HideWhenNone;
    56.                 else
    57.                     isVisible = (Motor.IsAlive || !HideWhenDead) && (gun != null || !HideWhenNone);
    58.  
    59.                 _text.enabled = isVisible;
    60.             }
    61.         }
    62.     }
    63. }
     
  6. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    Hi I watched this video:

    how to improve performance, but there is no information on what was done.

    There is this video:


    What are the fps in this environment:


    When inside my building I am only getting 12 - 13 fps. My building model does not have LOD, but low/mid poly detail.

    So I tested out flooded grounds asset: when in a house 6fps - 15 fps. when outside 9fps - 15 fps.

    I also tried out poly city: In this version, you cannot enter a house. But I'm getting 9 - 13 fps.

    My planned area is a city and the ability to enter only some of them. I am modeling these myself and asking for your advice or tips that I need to take into account in order to improve on performace.

    End platform is Web GL
     
  7. Jerome_V

    Jerome_V

    Joined:
    Oct 21, 2016
    Posts:
    42
    Hi,

    It has been a while (about 6 months) since your last post on the forum. Could you please update us about your plans regarding this awesome asset? It would be such a shame if you would abandon it completely.

    If you are considering to still keep the asset alive, may I suggest that you just continue to do maintaince updates and bugfixes, instead of adding new features? It would be great if this asset could be streamlined just as a 3rd person cover shooter controller that is easy to integrate with 3rd party assets (for advanced A.I., etcetera).

    All I would like to see is improved control of the character in terms of aiming, climbing (stairs/ladders), melee, fist fighting, etcetera. I rather have just a controller that is super-easy to integrate into my own projects than having to build my entire project into your project.

    If I may say so, with all due respect, I think this might be the right moment for you to make up your mind and inform everyone about your decission regarding the asset here on the forum.

    If you decide to continue to support and bugfix this asset perhaps via minimal/basic updates, then please focus on the controller part of the asset and stop adding features that are not essential to the control of the character (such as improved A.I., because we have plenty alternatives for that).

    Thanks a lot for all your hard work over the years! Please, return to the forum and talk to us. I'm sure we will all understand your situation, as long as you keep us informed.

    I'm looking forward to hearing from you on this forum!
     
    Mixa1985 likes this.
  8. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    It would indeed be very nice to hear from the developer as it seems that it is only with the very kind help of others that questions are answered or help given.
    Hoping to hear from EduardasFunka and wishing his family is safe and well during these very strange times for us all.
     
    Jerome_V likes this.
  9. BettoSan

    BettoSan

    Joined:
    Dec 7, 2017
    Posts:
    57
    Incredible that this asset is in the 50% off promotion. No updates or support. Not a simple answer on the forum.

    I was working normally on Unity2018.2.21.
    Due to bugs in other apps I updated to Unity2018.4.21.
    Everything works, but the character walks without moving.
    I created a New Project and downloaded only the "Third Person Cover Shooter Template", and the same happens.
    I've searched for the error for everything, I didn't find it :(
    Does anyone know how to indicate a path for this fix?
     
  10. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Im surprised this asset is in the “hidden gem” of the asset store. Being unsupported, well by the dev.

    What do you mean walks without moving? No animation? Sliding? Is the character in Tpose?
     
  11. BettoSan

    BettoSan

    Joined:
    Dec 7, 2017
    Posts:
    57
    The character performs the walking movement. But it doesn't move. But I managed to make it move, with "Apply Root Motion" enabled, in the Animator Inspector. But it was not supposed to be that way, as the CharacterMotor script creates gravity parameters and others.
    Later, with this correction, another problem: The zombies attack and freeze on the first hit they make. So too for TankMan.
     
  12. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Well you altered things with the inventory did you change something related to movement or gravity?
     
  13. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    I find the movement of the controller to be a pain to modify
     
  14. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    The “apply animator root motion”. In the inspector? Like just the toggle of it?
    Because that should be greyed out with “handled by script”.
     
  15. BettoSan

    BettoSan

    Joined:
    Dec 7, 2017
    Posts:
    57
    I didn't make any changes.
    What I did: I installed Unity 2019.3. I created a new project. I downloaded the "Third Person Cover Shooter Template" app. I didn't change anything. No red error. I opened the main scene. And there is the error.
    Works great until Unity 2018.2. In 2018.4 already crashes movements and other bugs.
     
  16. BettoSan

    BettoSan

    Joined:
    Dec 7, 2017
    Posts:
    57
    In the Weapon, which you find aligned with the character's bones. In the "Gun" script there is a gap with "Zoom".
     
  17. sas67uss

    sas67uss

    Joined:
    Feb 8, 2020
    Posts:
    81
    what is the best assets to creating first person shooter mobile game?
    for core and ai ? UFPS or Universal Shooter Kit or etc ?
    for input touch system ? easy touch or rewired or control freak 2 or etc
    and for save system ? easy save or etc
     
  18. Dawar

    Dawar

    Joined:
    Dec 7, 2014
    Posts:
    123
    do this with event base when fire call event this event attached to text which update the text
     
  19. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    324
    as i dive deeper and deeper into this asset ... i have come to admire the work that was put into it and feel sad how much this could have been a great asset !
    to feel what I'm talking about, i won't say how the dev quit support and that old track ... but thru code :


    Code (CSharp):
    1. _isAimingThroughCoverPlane = Physics.RaycastNonAlloc(origin, horizontalDirection, Util.Hits, _capsule.radius * 4, Layers.Geometry, QueryTriggerInteraction.Ignore) > 0;
    this line is responsible for detecting if the player is aiming thru the cover (wall clipping)
    it's nice and all but "_capsule.radius * 4" is the main issue.
    4 should be an adjustable Parameter, I have spent days trying to make the tall cover work .
    like :
    [Range(0, 10)]
    public float CoverRaycastplaneDistance = 4f;

    this would fix a lot.
    adjusting the value will make it work according to your game
    in my case shouldMoveBack , isCornerAiming will never change using 4 .
    1.91 is working .
    SAD just sad
     
    satchell and f1chris like this.
  20. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    324
    You might notice that the player, camera or Ai is shaking So much sometimes.
    this is due to the Transform position values have small numbers after ". " , like 3.00578 or 1.2114155
    you can fix it using this function in the main update or in every transform.position operations for the motor or the camera.
    public float AntishakeRounder = 100f;

    Vector3 PositionAntishake ( Vector3 Newpos ){


    float Nx = Newpos.x;
    Nx = Mathf.Round(Nx * AntishakeRounder) /AntishakeRounder;
    float Ny =Newpos.y;
    Ny = Mathf.Round(Ny * AntishakeRounder) / AntishakeRounder;
    float Nz = Newpos.z;
    Nz = Mathf.Round(Nz * AntishakeRounder) /AntishakeRounder;

    Vector3 FinalPost = new Vector3 (Nx, Ny, Nz);

    return FinalPost;
    }


    if AntishakeRounder is 100 the vector will have values like 3.02
    if AntishakeRounder is 1000 the vector will have values like 3.021
    if AntishakeRounder is 10000 the vector will have values like 3.0212

    example on the MobileCamera script :
    transform.position = cameraPosition;
    becomes
    transform.position = PositionAntishake(cameraPosition);


    you can use it on rotations as well
     
    f1chris and satchell like this.
  21. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    324
    if You still have shaking in the camera Change the Update To LateUpdate on the camera script mobile or third
    here is a comparison video:
     
    f1chris and satchell like this.
  22. junrill

    junrill

    Joined:
    Jul 27, 2016
    Posts:
    8
    Hi, anybody here has any idea how to integrate mobile auto-aim for Emerald AI?
     
    Last edited: Jun 9, 2020
  23. far00q

    far00q

    Joined:
    Apr 22, 2020
    Posts:
    6
    Hello, I want to Set Auto Aim for CoverShooter AI but i don't know how to configure it :( Kindly Help me if Anyone already done this!
     
    Last edited: Jun 15, 2020
  24. far00q

    far00q

    Joined:
    Apr 22, 2020
    Posts:
    6
    Nobody is here to ans or help :( so bad for new devs
     
  25. far00q

    far00q

    Joined:
    Apr 22, 2020
    Posts:
    6
    you can simply set the CharacterMotor script's variable isAlive to false :) and player will be died
     
  26. SinaFa1987

    SinaFa1987

    Joined:
    Jul 31, 2019
    Posts:
    5
    Hi. Our game using this asset (modified) with Unity 2018.

     
  27. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    can someone informed me howto integrating MiRRoR networking for multiplayer?
     
  28. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I agree with that.
     
  29. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    324
    it's the prefabs i think , try to open in 2018.2 ,then select all prefabs in the scene break them . and save in a new scene.

    transfer your project to 2018.4 or 2019 after that .the new scene should work.
     
  30. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    When standing close to a building or other object in my scene I am able to see through the main character.
    Is there something I can do to help with this?

    https://ibb.co/QC1RjHF




     
  31. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Set camera clipping plane higher or lower.
     
  32. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    I've been experimenting with the cover script and its use in my case.

    In order to help fix the camera culling issue with the main character. I took an unusual approach.

    I simply copied one of the cover objects and resized it and placed it directly in front of the buildings own collider.

    I no longer have the clipping issue, but its a lot more work.

    https://ibb.co/CbR9VPH

    Could you possibly help with information on correct settings for the camera clipping plane?
     
  33. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    324
    you need to edit how the camera script works :
    the simplest way is to attach a box collider (Triggered) and (Size of the box will be the limit of how much the camera will get close ) on OnTriggerStay you will move the camera to the back, I'm using the mobile one so i can't really help other than this.
     
  34. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Depending on the shader, you could scale the players transparency to camera distance
     
  35. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    Unfortunately, I am not a coder possibly someone could help me out?
    Possibly I am mistaken, with my use of the cover objects. The AI will need cover objects to effectively search or investigate through the play area. So I will still need them?
     
  36. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Any1 ever deal with, the character shaking bad while in cover and idle?
     
  37. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    Good Day
    How to make the Camera get view of the direction the player is Facing.
    i tried the Camera on the TPCS forum and it dont work for me.
    can someone give me a better idea?
    Thanks In Advance
     
  38. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
  39. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Use bone builder with uma and it should b ok
     
  40. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    I am slowly working my way through the tutorials on using fuse to create a new avatar, bone builder has not come up yet.
    Successfully imported fuse model into blender 2.8 and completed the basic setup steps, still lots to watch :)
     
  41. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Bone build ,you just hit... build bones. And it creates all the bones, for your uma, no skins. But you can attach weapons ect. Then prefab it, then use it like a normal uma, but it also has the weapons on it
     
  42. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    I have found the HumanMaleDynamicDNAStartingPose is this what you mean?
    If correct how do I use it to attach weapons to the UMA?
    Edit: I found this article http://forum.orkframework.com/discussion/4923/unity-multipurpose-avatar-how It seems like I'm on the right track now?
    What is the correct way to add the weapons?
     
    Last edited: Jul 24, 2020
  43. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    just add the weapons into the bones like normal
     
  44. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    Thank you for your help, I have asked for help over on the UMA forum.
     
  45. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    Given what I am attempting to do is related to this asset I thought it best to let you know.

    I am attempting to convert the cowboy to a UMA.

    Unfortunately, the default base of the bone for the UMA is in an A_pose.

    I have manually tried my best to add all of the weapons, hitboxes and colliders.

    I have no way of knowing if I have got this right :(

    https://ibb.co/cJRwvSx

    I still have to re_link all the used items within the third person cover shooter scripts.

    Some are pretty straight forward, but all of the weapons have there own special cases.

    I cant surely be the first one to try to do this?

    Advice welcome :)
     
  46. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Are you replacing the cowboy? Or trying to add the cowboy model into a uma system?
     
  47. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    So I'm feeling embarrassed, my apologies for not taking enough time to watch the instruction videos.

    After watching how to setup a new character I have been able to use a UMA.

    When you hit auto-create hit colliders be sure to give each one a unique name :)

    I still found it difficult to place a weapon due to not have a models mesh.

    The bone visualizer helps to get the weapon in a good position and by hitting pause I was able to readjust and copy the component and improve on the position.
     
  48. Basab

    Basab

    Joined:
    Oct 26, 2018
    Posts:
    1
    Hi! there,
    Currently, I am using the latest version. I am a beginner in unity. Everything I have completed as on youtube tutorial. But I unable to add inventory UI. I was creating a weapon shop. But I am confused. How it would suppose to be done? I have no idea. Could somebody please suggest me some idea, where I can use the scripts to my custom button to buy and use weapons?

    Thank You
     
  49. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    They should remove unsupported assets. Its a joke.
     
    angel_m likes this.
  50. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    They do....
     
    Paul-Swanson likes this.