Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Third person cover controller

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

  1. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,146
    I don't recommend this asset. The developer never included the suggestions or requests from the users and all the system is very complex and very tricky to customize so if you want to add more options or modify the ai behaviours you have to be a good coder.
    Besides the asset has been abandoned for a long time.
     
    pushingpandas likes this.
  2. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    When on sale, you still get a few nice models and a pile of animations. Without any code at all, this package is still worth probably 50 bucks...
     
  3. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    74
    What will be the best setting to get AI to stay in cover and move from cover to cover
     
  4. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    Hello, I have been researching two different approaches

    1. use a UMA as the cowboy replacement
    2. use meshbaker to combine the character with all the weapons.

    Almost a month ago I found adobe fuse and love it for creating my characters, but low draw calls are something that is on my mind. I don't really need for the characters to change clothing, but UMA does offer that ability with low draw calls.
    Using Meshbaker seems to be a much quicker avenue, but I would be very interested on your thoughts and views in to which method you would choose and why?
     
  5. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    Sounds like A pile of work for near nothing. If you only have a couple meshes visable.... only saving 1 or 2 draw calls hardly seems worth the effort.
     
  6. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    Using an adobe fuse as the main character straight out of the box is 34- 40 draw calls.
    Use meshbaker on this same character 9 draw calls.
    Using a UMA 16 draw calls.

    The process to use a UMA is quite a long one compaired to the very quick results using meshbaker.
    However, meshbaker disables the mesh rendering on the source objects.
    I believe when switching weapons the mesh rendering component is used by scripts and I am unsure how this will affect my ability to use the product.
    Maybe I can create a weapons manager script to disable/enable each weapon based on a keypress or mouse scroll.
    But that may not be enough or possibly the wrong way.

    I have asked over on the meshbaker forum, but maybe someone here has experience in using it and solved this?
     
  7. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389

    Atlas your materials and combine your skinned meshes, you shouldnt be over a handleful of calls. But disabling the main renderer will probably negate the Aiming IK. But you can bake the mesh, then add weapons.
     
    Last edited: Aug 23, 2020
    colpolstudios likes this.
  8. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    Not sure what I did but I got the cowboy replacement as a meshbaker without the gun. The gun is a separate object.
    I had not spotted the big differences in the size of the abode fuse model, the replacement guy is much taller than the cowboy.
    https://ibb.co/8mVhcdg
    I think my best option is to ensure any replacement is the same height as the cowboy to avoid any possible camera issues.

    In this short video clip, I am hoping to solve why there are any changes with the cameras.

    at section 0.15 is the orignal fuse character and at section 109 is the optimised version.

    If you look closly you do not see the gun in the hand.

    But why is there any changes?




     
    Last edited: Aug 26, 2020
  9. abdullahok

    abdullahok

    Joined:
    Jun 10, 2020
    Posts:
    3
    Are you using the animator provided in the template and is it set correctly referenced in your character animator?
     
  10. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    The gun is there, the camera angle is slightly different, so he is blocking the gun. Just change your camera angle
     
  11. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    But why any changes. It is the same character, but using meshbaker.
     
  12. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    Maybe it changes the center, like a anchor point. The camera is offset from that point
     
  13. abdullahok

    abdullahok

    Joined:
    Jun 10, 2020
    Posts:
    3


    Hey Rahd,
    I was wondering if you managed to do a complete working inventory system? If so, was it easy or did you need many modifications?
     
  14. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    323
    it was easy just use the third person inventory script to link to the inventory pro system (it free on Github)
    then when making a new Item in the inventory pro Editor, just add an ID to each item, and do the same to each gun or melee weapon script, etc ...this way you can compare the id to know what item in the inventory pro was equipped the cover shooter player should equip . for things like medication or buffs like food, let inventory pro do the logic then link the Health of cover shooter script to add the result of each health buff from the inventory pro system,
    Simple but take a lot of time.
    I might change to invector or opsive controller , Due to issues I could not solve regarding performance on mobile.
     
  15. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    25
    I think it's work great on mobile, just use pooling for enemies & spawn 3 to 5 enemies at a time
     
  16. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    Invector for the win! Invector fsm ai, is easy to use, and good, with cover and grenades and everything
     
  17. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    323
    i'm using the old package for mobile that did not see an update for years now, i bought the full package as well in order to keep working on the game .
    charactermotor script is the cause , a lot of modules are running even when not needed . cover logic is always checking , groundcheck is done wrong , the motor tries to simulate gravity and it will end up with your player flying in the air or going thru objects if the frames drop , the charactermotor script on mobile is eating up about 7% of cpu
    add some more AI and you are done . animator component on the walk State is a tanker too ... try to edit that ...
    i'm like really done . i learned a lot , the assets has some good features that i will transfer to to whatever i'm gonna switch to . i really wanted this asset to be better but the dev ... ? won't even put it opensource on github.
    cheers and good luck everyone .
     
  18. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    25
    Every asset have problems i know that, i bought this controller because its animations looked production ready, other controller on store mostly walk slow like turtles when you make game with those controller the game look very lame. Increasing speed does not solve the issue. Bad thing is the developer of this asset does not seem a helping guy he has left the support long ago otherwise fixing few things in this, adding some new features in an update or two this kits would have been a masterpiece tps kit on unity store. Also its ai it far better than all other tps kits.
     
    Rahd likes this.
  19. flowe321

    flowe321

    Joined:
    Oct 27, 2016
    Posts:
    12
    I'm working on adding a "take down" action to the players arsenal. My approach right now is going to be removing player control with a separate script that handles a "disabler" and play an animation... Is this the best approach? Any recommendations on better ones? I would like to just expand the melee capabilities, but I'm not sure how to approach doing that.
     
  20. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    323
    Probebly adding the animation in the melee attack , and make animation state behaviour script (just copy melee script)
    and use animator match target for the hands and body to hold the enemy .
     
  21. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    Rewired does this pretty much by default. But the mouse is in the camera script i believe, if not its in the put script. And the rolls are a double tap if i remember right
     
  22. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    Indeed Rewired does, but I don't have it!

    I have looked through a lot of the scrips and am unable to find a section like this:

    Input.GetAxis("Mouse X") and Input.GetAxis("Mouse Y").

    Does anyone know where I can find this section in the scripts?
     
  23. zero1024

    zero1024

    Joined:
    Oct 10, 2018
    Posts:
    3
    Greetings to all the amazing people here, keeping this asset alive!

    I'm encountering a very strange issue and I need your help.

    I'm developing a third person game using the "Third Person Cover Shooter Template" asset and I'm encountering a huge drop in performance randomly as I play in my scene.

    According to the Profiler, the problem comes from the "AIMovement" script and specifically from the void Update().

    I developed my own method of spawning squads of enemies on my terrain, I instantiate multiple empty GameObjects from a pool at random locations and then using a script attached to that empty GameObject, I instantiate 2 to 5 enemy NPCs from the Third Person Cover Shooter Template.

    Everything works perfectly and the NPCs are spawning on my terrain.

    When I try to Play the scene, I get steady 60FPS even on heavy battle situations with multiple NPCs at the same time. The problem is that completely at random, the FPS suddenly drops to 8-10FPS!!

    After using the Unity Profiler to identify the issue, I saw this:



    On some frames the AIMovement.Update() gets up to 75%!

    I tried to debug the Update on AIMovement myself but I couldn't find anything wrong or even suspicious...

    I obviously tried anything related to collision, to make sure NPCs aren't spawning inside trees, rocks, each other, terrain etc.

    I've also searched the forum here for any similar issues with that script but I got only 2 results that are completely irrelevant to performance issues.

    I'm obviously missing something (most probably on the AIMovement.cs code) but any help would be greatly appreciated!

    If I missed to mention/post anything (like parts of code) please feel free to ask. Thank you for your help
     
  24. abdullahok

    abdullahok

    Joined:
    Jun 10, 2020
    Posts:
    3
    Do you have the game and scene window open at the same time? This usually drops my frame rate a lot.
    Looking at the update function of AIMovement, there is the Debug.Drawline calls.These may be costly if they are enabled in Inspector for your enemies.
     
  25. zero1024

    zero1024

    Joined:
    Oct 10, 2018
    Posts:
    3
    Thank you for your reply, I'm sorry I forgot to mention that the same problem also occurs when I build the game and play it on my PC. So it can't be a Unity Editor related issue.

    Yes you are correct about the "DebugDestination" and "DebugPath" but I already tried with both of them disabled (or even removed the code at some point completely) but still the same problem randomly occurs. o_O

    One theory I had, was that maybe some of the the NPCs are spawning in locations that are not walkable according to the nav-mesh. But I'm not sure this is the problem, because sometimes it happens at times that no NPCs have been spawned, really seems random...

    The empty GameObjects that I mentioned, have a script that checks for the distance between the player and the GameObject. If the distance is less than "my number" then it will trigger the squad to spawn. With the same logic it will perform a "cleanup" when the player is far enough from the GameObject, by destroying the NPCs.

    I explain this to help you understand that I always know when a new squad spawn will happen and the problem doesn't seem to be related to that spawn process either :(
     
  26. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    389
    When spawning do you not sample nav mesh position to place them on the navmesh?
     
  27. zero1024

    zero1024

    Joined:
    Oct 10, 2018
    Posts:
    3
    I don't have to, the empty GameObjects are 100% inside the walkable area. It's a randomly generated terrain and I use the height to get the random locations on the terrain. So if the height is low enough to spawn the objects, it's low enough to be walkable by the nav-mesh build settings.

    The only reason I thought this might be the problem, is because the NPCs are being spawned at random locations around the empty GameObject's position, somewhere between 2 to 10 units to make sure they aren't being spawned one inside the other. (plus random rotation between 0 to 360)

    But the moments the problem occurs, are not related to spawning... It just happens o_O

    You really think this might be the source the problem? I will check it again just to make sure, thanks for your input :)
     
  28. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    Solved:
     
  29. Felinsky

    Felinsky

    Joined:
    Jan 22, 2018
    Posts:
    15
    Anyone using asset in Unity 2020.1 ? I have lot of errors after importing to 2020.1
     
  30. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    25
    I guess you should wait for the developer to update it for 2020, that's all he does.
     
  31. yufik_selalu

    yufik_selalu

    Joined:
    Jul 6, 2019
    Posts:
    3
    Helo.
    I need help.
    How to setting stamina on thirdperson scene.
    Thanks
     
  32. dawargu4

    dawargu4

    Joined:
    Jun 17, 2020
    Posts:
    7
    use mixamo rig to work well with animations
     
  33. dawargu4

    dawargu4

    Joined:
    Jun 17, 2020
    Posts:
    7
    check your particle system nost its occur because of muzzle flash particle system use model inside of particle system. and also check the bullet eject its despawn or not .
     
  34. dawargu4

    dawargu4

    Joined:
    Jun 17, 2020
    Posts:
    7
    when you running or waking reduc stimina value from 100-to zero if its zero start reducing your health with your rate.
     
    yufik_selalu likes this.
  35. dawargu4

    dawargu4

    Joined:
    Jun 17, 2020
    Posts:
    7
     
  36. yufik_selalu

    yufik_selalu

    Joined:
    Jul 6, 2019
    Posts:
    3
    thank you i got the point.
     
  37. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    104
    Very much still a work in progress.

    Use either a PlayStation or Xbox controller to control the cowboy or your model.

    Try it out here

    Updated: 08/10/20

    https://colpolstudios.itch.io/playmaker-control-and-tps-cover

    If you're lucky enough to own both controllers you can unplug one. Plugin the other and hit the restart and choose it :)

    Curious if you would like keyboard supported as well?
     
    Last edited: Oct 8, 2020
unityunity