Search Unity

Third person cover controller

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

  1. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    No melee has not been announced.
     
  2. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    No, it has custom animation feature that can be made a melee attack but its meant to open doors or push button thing.
     
    Rahd likes this.
  3. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    mele will come probably summer.
     
    zenGarden and Rahd like this.
  4. IndieGeek

    IndieGeek

    Joined:
    Sep 30, 2016
    Posts:
    16
    We really appreciate Tutorial videos for this project.
     
  5. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    @EduardasFunka
    I'm having an issue with AI. Here is my setup:
    1. I have an AI in a small room behind a closed door.
    2. That AI has the Listener turned to 0. (He's behind a door and shouldn't hear me)
    3. That AI is on the opposite team of the hero.
    4. When I open the door, the AI doesn't see me or react until I shoot. If the AI is out in the open they immediately see me. When I shoot, it just runs past me.
    5. Even though the AI doesn't see me, it still notifies friends because soon they come to look for me.
    6. Even though the AI's friends are looking for me, it's almost as if they don't know my position and also can't see me until a few moments either I move or make some kind of sound.
    I am using the AI from the test scene, so it can't be my configuration. Generally speaking, I only ever get the AI to act "right" when they start off patrolling, otherwise it is not predictable.



    Do you have any thoughts on how to get this to work?
     
  6. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    AI needs some improvments.
    -When you fire around without touching them, AI should also react when hearing player fire sounds, and other AI around should also be in alert mode and move towards sound source.
    - The AI running to cover while player is in sight must be corrected
    - AI walking near player and not firnig is strange , did you setup AI to be aggressive enough ?
    it should react when the player is near and detect it with raycast any time
    Perhaps there is some problem with co routines or alerts ?
     
  7. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    As far as the setup, I am using the same setup that is being used in the demo scenes provided.

    I agree that the AI needs a major overhaul. It really feels like the developer focused more on number of features rather than getting the core ai decisions down.

    The developer did do a lot of great things and the modularity is quite cool but it makes things really complex to update on our own. There isn’t nearly enough documentation and I wish that the developer would just do an update focusing on that.
     
  8. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Yep i had situations where AI behaviour was stuck or not able to pursue the player for example if you have some level parts that are higher than other. The base needs some work indeed, when the AI sees the player it should fire or fire while moving whatever the situation is.
    The plugin should be tested in complex scenes like indoor with doors and obstacles and multi level floors.
    Anyway i'm not sure there will be some update before many months as melee feature is planned for summer.
     
  9. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    Yeah, I’m pretty sure the AI doesn’t even see you most of the time if you turn down their Listener to 0. I’ve resorted to cheap tricks to get them to work in certain situations. Like when I open a door in front of them, I spawn a landing effect on the player to get the AI to notice I am there since they won’t see me even when I walk around them. They also don’t seem to give up and go back to their patrol.

    In defense of the developer, AI is a really involved thing and deserves its own package by itself. What my issue is here is that there seems to be a focus on quantity over quality and not enough regular support to fix all the issues with it. And it’s unfortunate that this doesn’t have the support it needs. It has such awesome potential. I have resolved myself to just using this for the beta and roll my own solution for the full version of my game.

    At some point Unity team needs to consider pushing developers who do not support their product to either sunset or open-source their product so that he community can build on it without fear of having their work overwritten by the occasional patch or update.

    For now, I’ll patiently wait for them to respond and hope that they provide better documentation, more organized and commented code or an update.
     
  10. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You should not have to use tricks to make work a plugin as it is supposed to work :rolleyes:
    There will be an update with melee next summer at least, so i hope the AI will be improved and tested on more complex levels.

    Support was at start, but like most plugins support becomes lower after some months.
    Last big update fixed the most problematic issues and it was a full refactor with lot of changes. I think the author needs a break from the plugin.

    You got the full code for TPS cover plugin, but even like that we expect the plugin to be stable and minimum rock solid instead of having AI not working so well in some situations.
     
  11. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    I see some negative minds feeding eachother to the edge of conspiracies. Guys relax nobody is abandoning anything and nobody needs a brake ( ofc we like some weekends away from pc)

    Thanks for your support with the project even its not behaving how you want it to behave. We will help you to figure out.

    We are here talking about AI in third person controler because you guys wanted to make more then just walking simulators and asked for more features in your emails and forum posts. You shaped that TPCS becoming Ai plugin. There must be a need for those things because 90% of emails I get is about "how to make Ai do x" and there is no product that does x.

    But AI is hard, thats why even best AAA companies cant make bug free games and we all have seen many funy Ai glitches and bugs in youtube videos. I dont know game Ai developer who sleeps relaxed at night. Even I am here talking about AI in the midle of the night on my phone with you.

    1.5 is coming its all about AI. We fixed lots of issues and ofc there will be new ones that we will fix in future updates.

    Lets try to put our attention on issues and not conspiracie teories how TPCS is dead and all is doomed. We are here and working.

    Brb on Monday!
    Will try to go sleep now. My wife is not hapy that my phone is On. ;)
     
  12. Mandarb

    Mandarb

    Joined:
    Oct 25, 2017
    Posts:
    3
    Hey,

    your Asset looks really cool. One review said that the AI isn't using Navmeshes. I was wondering, if that is true and if so, what it uses instead to navigate.

    Thanks,
    Mandarb
     
  13. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    some people probably dont understant what navmesh is. IT use NavMesh.
     
  14. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    There is no conspiracies.
    We just get some issues with AI basics like not able to see the player in front of it, the plugin needs serious testing and testing in more complex level design and situations. You can't expect all users to use the plugin with only your one floor demo level.
    And like most plugins, updates are lower after some time, it's normal as author plugins moves on to new things and don' t have as much time as when plugin went out.
    There's nothing to worry about.

    You should define what features to include and what features to avoid, you can't make a plugin that will cover anyone needs or it's a non ending development taking too much time and delays for updates :rolleyes:

    Coding all AI is not so hard with high level tools like Behaviour Tree, FSM or Goap.
    Those would have spared you tons or coding and issues while you would get better debugging.There is some Unity such open source free tools you could have helped you.
    I already coded AI many times, modular code and clear separation of features is very important, and you've done a good refactor with last version. Unfortunately AI basics doesn't work as good, there is some things that must be redone in another way i think.

    Meanwhile i used another solution covering melee because i need less features, but i'm still interested to get TPS cover plugin stable and solid with melee support so this could be the main AI system for some tps mobile game.
     
  15. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    Conspiracy theories? Negative? I have been complimentary toward your product and defensive of your efforts. I was simply pointing out issues with the asset I spent $77 on and is currently featured in the Asset Store. The AI needs lots of work, there are some QA needs and documentation and code commenting would help enormously as the modular nature of the asset makes it really confusing and nerveracking to make edits without breaking things. If coming to this forum and pointing out issues/ asking for help is coming across as negative then I apologize. I'm not asking or expecting it to be perfect and that is what this forum is for... We just want communication. We just want help making something that is broken work after we paid for it. Also, most anything can be forgiven with good communication. Letting us know what's coming, when and where things stand saves us from wondering if you are still working on the asset that is a core piece of a lot of people's games considering the type of asset it is.
     
    zenGarden likes this.
  16. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    @MastermindInteractive
    I tried to reproduce your bug and could not.
    here is video

    Could you send me your project so we can look in to it.

    @zenGarden
    I don't know how you guys came up with those ideas it does not help me to help you with your project.

    I got 0 emails from you zen just lots of negative posts about TPCS from now on let's try work on specific issues without speculations that we need to close shop. If IA got stuck send us your scene it will help to tune and fix.

    Thanks
    Ed
     
  17. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I think you need a real test case building with close walls, corridor and many AI to get a similar scene where raycast and other interaction between AI will work differently.

    Because i choose another solution with less features but simple and effective, and top down version TPS cover needs joystick support and some camera options.
    Anyway there is no hurry and i'll post issues here on forum when i come back trying using it.
     
  18. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    If you hunting for a bug it's better to reproduce it on a smaller project. You said elevated and walls, ok test that, more AI ok test that. You do not build a word to test a bug. We tested on big levels it was working. But we cant test every scenario send me a level and we can try to fix it. It may be a bug or it may be that you new to the AI and new things when you don't know strengths weaknesses could produce undesired effects.



    When you get new software and its not working like you want it to work it may be a bug or it may be that you don't know how to build things with it.
    so you have 2 options tell developers that they should close a shop and burn in hell, or you can ask for help how to do things. If you found a bug tell them that "hey look it a bug lets fix it".
    I prefer option 2.

    Goodluck
    Ed
     
    Last edited: Mar 5, 2018
  19. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Indeed but you must test basic functionality and get it rock solid :
    - no covers, how the AI will react ?
    - many AI in close space , only few covers , will it work ?

    You would need real game levels, your demo with so much covers is a demo.
    This is how would look a real game outdoor level i make with fluent space


    If i remove most covers from level the AI is just moving around trying to keep distance from player,
    but unable to fire when player in on line of sight o_O



    Should we get paid for report bugs because we are beta testing your plugin
    for some basic functionality not working :rolleyes:

    Anyway, sure we can report bugs to improve it (if it doesn't break in another update).
     
  20. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    Those images says nothing. We build cover shooter main functions goes around covers. It looks to me that there is no way we can make you happy your mind is set.
     
    Last edited: Mar 5, 2018
    Unplug likes this.
  21. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I didn't reproduced this one, but it happened i don't know why.

    Anyway is this old one fixed with AI unable to follow and target the player when player is hiding on some height ?
    The AI is firing but fire doesn't touch the player.


    Or it is intended behaviour ? It's not that bad as AI is doing some suppression fire in some sort, while it could follow the player to do damage.
     
  22. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    There is ways to make AI aggressive I show it in AI video tutorial.
     
    zenGarden likes this.
  23. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Is AI able to get closer to player ? Because many AI around are unable to target it, they are shooting but most of the time they shoot the level objects.
    They are doing suppression fire, while one AI could try to get closer.


    Another bug sometimes the player stays in crouch mode without any cover object around.
    Perhaps a trigger didn't happen after leaving a cover ? Or it is intended to work that way ?


    I got a request about pooling for footsteps and particles.
    There is too many objects created and destroyed while pooling would save performance.
     
  24. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    Thank you for the videos. What version of your code are you using? What do you think my issue might be? Showing me a video and saying "mine works fine" is not helpful to me. I have followed your videos and used fresh installs and it's not working for me like it works for you. In my scene I am using your assets from the demo, no changes. I am building the navmesh and I am opening a door just like you are, and I'm not getting the same results. Just because you can't replicate it doesn't mean it's not an issue, it just means that you know the ins and outs of your software so you will do things the way that you know you built them. Having other people use your asset in unexpected way is the best way to find bugs.

    Here is the thing.. People who are active in your forum and finding bugs are people who are actually using your software. I'd bet that the majority of people who purchased your asset just got it to toy around or find out how you did things. I understand that you are frustrated but the way that you are handling this situation isn't good customer service.

    I also apologize for my comment on open-sourcing abandoned projects. I was making generalities and not suggesting that your asset should be made open source. You even failed to add in my comment where I said that I would patiently wait for your support. I was also saying that because in cases when the community feels like they aren't getting regular updates or good customer support and they rely on a package for their game, that it might be helpful to put it into git or something similar where people can make branches and help each other solve the problems.

    I would also like you to consider one more thing.. You say "when you get new software and it's not working like you want it, it may be a bug or it may be that you don't know how to build things".. That's just insulting. I've been a software developer for 10 years. Is it possible that people just don't have the proper documentation or code commenting provided to them so that they know that issues aren't bugs? You have provided 2-3 videos on how to set up characters and in both instances there were points where it didn't work for you and it seemed like you were figuring it out as you went. So what should we expect?
     
    Last edited: Mar 5, 2018
    zenGarden likes this.
  25. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    226
    i would suggest that you refund zenGarden if he bought it the first place. , I really had it with him,
    he is not help full AT ALL . i just went thru all of his posts since day one , all what he is doing is not helping .
    AI , AI ,AI always jumping on the Dev throat .


    MastermindInteractive STAY OUT OF THIS . I"M TALKING ABOUT zenGarden .

    i will do my best to fix something ,i'm no genius and some of my suggestion to fix something might not help . when i do find a bug i try to fix it first , then post it and talk about it with some sense here , MastermindInteractive you are doing just fine , but before you associate yourself with zenGarden go back and read all of his posts on any forum not just this one .
    to have less drama Go to the asset page and email the dev .
    To answer your question about indoors AI , the enemies in my game are inside small apartments , they see perfectly and hear just fine , just lower the sound on the player for steps " . and add sight to the ai
    upload_2018-3-5_5-27-52.png


    jump into the script it's super easy to make what you want .

    i made coins in my game that will make the AI investigate where you throw the coin , how ? simple
    on the Grenade prefab , change it to coin mesh and a script with sound effect and add a trigger collider , , the script first play the sound then collect all AI in range and ask them to investigate the center of the coin .
    I made flash grenade with the same concept , but the AI in range will have a timed blind effect and cant see or hear but they are aggressive .
    i made smoke grenades that will make AI blind as long you are in the smoke , using the Grass prefab , EduardasFunka did on the night mode .
    the plugin have endless possibility if you just look into the script , just a little bit .
    yesterday i just finished burst fire mode for guns , and bullet ballistics that will make the bullet drop and bounce .

    Now back to zenGarden
    EduardasFunka you need to end his licence or block him from the forum if he don't change this behavior.
    he keeps attacking the dev and members . i had my share months ago when he said

    EduardasFunka did you verify his invoice ?


    1-Maybe just maybe reduce the distance limit to threat , on the Fighter brain if you want them closer to hug the player ??
    2-maybe just maybe if you dont click on the center of the screen to crouch while in cover ??

    3- I have about 50 guns in my game , each gun have unique sound and unique gun effect , bullet casing effect .. .ect that's more than 500 particle systems
    and sounds .
    why i'm i getting 60 fps on my 4 year old phone ? and you having issues is just mind blowing . maybe add a pooling system ??zenGarden !!
    THE DEV IS NOT SELLING A POOL SYSTEM A POOLING SYSTEM IS FOR FREE





    THE ASSET HAD LAG PROBLEM IN THE PAST BUT AFTER 1.4 ALL IS RUNNING GOOD AND IT NEEDS just MORE features . features that i would pay for it again if the dev decided to release new pack . like a pro edition
     
    Last edited: Mar 5, 2018
    Hamesh81, Devision4 and EduardasFunka like this.
  26. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    I have not done anything just like you downloaded 1.4 (because my version 1.48) and made that level. I can do all that on a video if you want. I have no idea what is wrong. maybe actor puts you on the same team? I need your project to tell you. You said you did workarounds or something, maybe those have influences maybe we left some stupid bug.. maybe unity version bug (I test on 2017.2.0f3). I made you a video because you made me a video. If you send me a project I will send you a project back. Imagine person unintentionally deleted something inside project made a video that it's not working and now I need to fix that, what kind of answer you suggest be good in that situation?

    That's why I don't like give support on forums because it could be back and forward with symptoms until you find something. And nobody reads it again anyway. And you could be interrupted... by other questions etc...Send me an email eduardas.ninja@gmail.com it official channel to give support and it's best. I can read our history its easier to remember who I am talking to, what we are talking about what your goals etc.

    This forum for me was to announce new versions and gather ideas what you want from this product.

    I am not frustrated when you guys ask a direct question or talk directly about issues. But when you say "I agree that the AI needs a major overhaul." it does not give any constructive feedback it just scares other people away from the product who read those statements. Maybe it's not a professional way to answer sorry for how I answer I am not PR person, but we all people lets just agree that our goal is to have better product tomorrow. We all benefit from that.
    Send me your project so I can help you.
     
    Last edited: Mar 5, 2018
  27. hitboxfun

    hitboxfun

    Joined:
    Mar 5, 2018
    Posts:
    6
    I cannot find How to Vault and climb Please guide me
     
  28. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    press W2x forward A D S 2x to other sides
    Press W and space to climb
     
  29. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You seem to have lot of time to loose on forums lol
    Did you ready read my old posts ? i was the one first pointing out big issues with AI.

    For example AI stuck when player get close on the first version or AI stuck on corners.
    Without my reports you wouldn't get the actual better version :rolleyes:

    The plugin author ignored some of my posts about AI broken in some situations , and i just let it go, still not improved :


    Indeed your game design is ultra simplistic, very planar so you should not encounter issues other can encounter.


    Lol

    Did i ever insulted him ? I even rated the plugin with more stars than it deserves considerind issues or considering there is no joystick support for a Top down game and no camera options for mobile.

    It's not my fault if the author was not very present on forum and just came back like in full panic these days and speaking conspiracy ? o_O
    I don't know what is going on with him these days ?

    I think you are right i must stop telling issues or bugs, i'll wait for next update and see if i use it or move on with other more stable solutions.
    Telling issues and no improvements is made is a waste of time :rolleyes:


    Anyway, it looks like reporting issues or AI not working is making some people a very defensive lol

     
    Last edited: Mar 5, 2018
  30. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    226
    EMAIL HIM how hard is this to understand ?
     
  31. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    Imagine a person unintentionally deleted something inside project made a JPG and tells that's it's not working and now I need to fix that, what kind of answer you suggest be good in that situation? how can developer fix that?
     
  32. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    Well, its way more complex to whatever you created. Or I am wrong?
     
  33. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Its' your scene from your plugin, move up with the player to the top platform and look at AI staying asides unable to do damage and unable to get more closer to the player. I don't even need any images, just play your demo :rolleyes:

    With more heights , stairs , yes it's not a test case you have, your demos does not have two floors and some heights platforms.

    Anyway don't worry, i won't post no more issues or point out some things that could be improved as you seem in panic mode or embarassed.
    Unlike some other using your plugin as the main AI system, i have alternative solutions so even bugs or issues i post are not priority indeed , but i would have been happy to use your plugin for a game and get a plugin a bit more stable when it went out.
    I don't need to post here, like many other users that buy a plugin but never never come to the plugin forum, i'll just wait for updates and see if i use it or not.

    Have a good day.
     
    Last edited: Mar 6, 2018
  34. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    I'm using Unity 2017.3. I wonder if this might have introduced some issues as I did notice a few things change when I upgraded but nothing crazy. I'll work on sending you a project ASAP and I will send you a link in your email.
     
    zenGarden likes this.
  35. hitboxfun

    hitboxfun

    Joined:
    Mar 5, 2018
    Posts:
    6
    thank you for your reply
    in your demo scene its working fine
    but in new scene its not working.
    how to create climb and vault obstacles. is there any layer setting ??
     
  36. hitboxfun

    hitboxfun

    Joined:
    Mar 5, 2018
    Posts:
    6
    how i will spawn enemies OntriggerEnter ?
     
  37. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    @EduardasFunka - So I figured out my issue with AI not seeing me. It has to do with the way that I am building levels using Modular pieces each having colliders on them. In the AISight script you are caching a collection of 128 colliders and every frame each AI gets a list of colliders based on the distance using an overlap sphere. Because there are so many colliders in my scene, my actor is not in that list so the AI does not "see" me as it "sees" everything else. While this might not be a bug, this is definitely something that you may have not planned for. Using layer masks will help here and also might save on performance since it would only check for colliders on the Actor layer. If there are scenes with a lot of objects in them with colliders, close together, this will cause issues because the Actor has to be in a list of 128 objects.
     
    Last edited: Mar 6, 2018
    gamedezv, zenGarden and EduardasFunka like this.
  38. MastermindInteractive

    MastermindInteractive

    Joined:
    Jun 13, 2014
    Posts:
    83
    The AI have the ability to call in support / spawn bad guys so you might be able to use those scripts. In case you are a beginner with code, a quick and dirty way to do it is to have several AI agents disabled in a certain spot and OnTriggerEnter you can use a script to enable them. You can even set their Start Mode (on the fighter brain component) to Search Around the area of the player's position when the trigger was hit. Hope that helps, but I'm sure the developer will have other ways.
     
    Rahd likes this.
  39. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    To climb on something you need cover objects. You can copy those from main scene, scale it how you like it.
     
    hitboxfun likes this.
  40. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    Yes, you are right. We will improve the system for our upcoming update.
     
    Last edited: Mar 6, 2018
    MastermindInteractive likes this.
  41. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    Create prefabs for your enemies and instantiate them using GameObject.Instantiate to create them at various locations.
    Additionally, you can set up our spawning system and trigger a spawn with a SendMessage("Spawn", null) call
     
  42. IndieGeek

    IndieGeek

    Joined:
    Sep 30, 2016
    Posts:
    16
    I guess by making some tutorial videos reduces user frustration a lot.
     
    CupitorImpossibilium likes this.
  43. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    210
    any news for the multiplayer?
     
  44. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    Its in plans no exact date.
     
  45. EduardasFunka

    EduardasFunka

    Joined:
    Oct 23, 2012
    Posts:
    460
    We have some check my youtube channel. Will do more in future. Planning to make a video about every single script in game. Like one with new AI.
     
    IndieGeek, GMax and redoxoder like this.
  46. Rahd

    Rahd

    Joined:
    May 30, 2014
    Posts:
    226
    To add swimming :
    go to MobileController script
    then enum CharacterSpeed and add Swim
    then Update() --- and add under
    switch (Speed)
    case CharacterSpeed.swim: movement.Magnitude =4.0f; break;

    add a new func
    public void changeswim(int id){
    if (id == 1) {

    Speed = CharacterSpeed.swim;


    } else {

    Speed = CharacterSpeed.Run;

    }



    }


    now add a Triggercollider on the head of the player and on the water mesh make the water mesh with a tag "Water".
    and make a script called swimmanager

    public class Swimmanager : MonoBehaviour {
    public CoverShooter.MobileController player ;
    void OnTriggerEnter(Collider other) {
    if (other.gameObject.tag == "Water") {
    player.changeswim (1);


    }

    }
    void OnTriggerExit(Collider other){
    if (other.gameObject.tag == "Water") {

    player.changeswim (0);
    }
    }
    }

    attach swimmanager to the head colilder
    what happen is when the player head is under water he stars to swim . when he is not he walks.
    then edit the animator like this
    upload_2018-3-8_8-1-57.png
    and add a swim animation from mixamo. com

    (this code needs more polishing)

    results :
     
    Last edited: Mar 8, 2018
    redoxoder and EduardasFunka like this.
  47. AnthonyMyers

    AnthonyMyers

    Joined:
    Jul 25, 2014
    Posts:
    28
    I would like to chime in on the latest posts. I'm very happy with my purchase!!
    A lot of the topics that have been posted can be resolved just by rolling up your sleeves, testing settings. There's no other asset on the store that's even close to a top down, 3rd person, AI cover system,and working butter smooth.

    As an artist this is very important to me!! The scripts very understandable and easy to tweak. Cant wait for the new melee system because the sky's the limit!! Pirates, RPG ,western, zombies the list go's on.

    Rhad has some the greatest examples of what you can do with a little work.

    To add to the ideas that always flow when working with Eduardas asset try adjusting the grenade angles and distance and think of a cannon. Done. or a gatling gun with the same script and machine gun added there you go 2 off the top of my work flow head.

    Keep up the great work and i'm waiting eagerly for the new update
     
    redoxoder, EduardasFunka and Rahd like this.
  48. wanglibin

    wanglibin

    Joined:
    Nov 13, 2016
    Posts:
    11
    im a newer,who can tell me how to Dive to cover.
     
  49. wanglibin

    wanglibin

    Joined:
    Nov 13, 2016
    Posts:
    11
    i find it,double-click wasd,i try this for whole day:(
     
  50. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Keep up the awesome work on this asset @EduardasFunka , looking forward to where you take it.