Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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

Assets Third Person Templates by Invector

Discussion in 'Works In Progress' started by Invector, Aug 20, 2015.

  1. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170

    PS: Here are my EnemyAI settings, just incase I've messed something up:

    Screen Shot 2018-02-07 at 1.56.41 PM.png
     
    Last edited: Feb 7, 2018
  2. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Also if I want to have several (say a dozen) EnemyAI that are exactly the same should I simply duplicate in the hierarchy? And is there a way to have them all use the same V_Ai Controller settings?

    thanks,
    rich
     
  3. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    You can try lower the Iteration values so he can make a faster update and find the target.

    ps* keep in mind that we're currently working on a new AI from scratch, so I wouldn't spend too much time on this one :p
     
    Mikki likes this.
  4. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170

    Now you're just teasing us :)

    -rich
     
  5. Mikki

    Mikki

    Joined:
    May 22, 2017
    Posts:
    4
    Why i cant brake Object with gun like with Player Roll in vMeleeCombat_DemoScene ?
     
  6. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    I want patrolling NPC in my game. And those NPC's will attack player when player damage them other wise they will always patroling on their waypoints. Here in this scenerio i have done NPC patrolling but how can i do the other thing(enemy will attack when player demage the enemy).
    Your help will be appreciated. Thanks in advance.
     
  7. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    you can i think you are missing layers or tags
     
  8. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    I have done it. You guys are awesome just on bool i have achieved the functionality. Great work
     
    Invector likes this.
  9. painkiller2007

    painkiller2007

    Joined:
    May 25, 2013
    Posts:
    43
    When I try to roll while strafing, the character always rolls forward ... I remember in the earlier versions of melee combat, the player character used to roll based on the direction input while strafing ( lock on to enemy ). How to fix that @Invector ?
     
  10. Azman138

    Azman138

    Joined:
    Jul 8, 2017
    Posts:
    15
    Missing FootStep Sphere Trigger, please unfold the FootStep Component to create the triggers.

    how to fix it?/
     

    Attached Files:

  11. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Did you add a footstep component to you player?
     
  12. Azman138

    Azman138

    Joined:
    Jul 8, 2017
    Posts:
    15
    You mean this one ? if this is not the one than tell me how can i do that? and also its giving me sounds of default foot steps.Nothing else.But i set gravel as default
     

    Attached Files:

  13. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    In the inspector, do you have a footstep component there?
    Screen Shot 2018-02-14 at 8.06.54 AM.png
     
  14. Azman138

    Azman138

    Joined:
    Jul 8, 2017
    Posts:
    15
    yeah look
     

    Attached Files:

  15. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Off hand I don't know. I would delete that component and add it again. Hope that helps.
     
  16. Azman138

    Azman138

    Joined:
    Jul 8, 2017
    Posts:
    15
    So i should make that once again right?i mean the characer
     
  17. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Well I would try to remove the footstep component and then re-add it (New Component and search for vFootstep). If that doesn't work then maybe redo the entire character if you have not customized him too much yet.
     
  18. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    You literally just post the solution... :p
    "please unfold the FootStep Component to create the triggers"
     
  19. Mikki

    Mikki

    Joined:
    May 22, 2017
    Posts:
    4
    Hi! Can i add a breakable object to a enemy body parts? i want to make a headshot and i try everything and nothing work for me. (enemy head is different object than the body) i want the head disapear when hit
     
  20. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    182
    Will this break with 2018.1? I'm not planning on using the beta. Just wondering if when it is released I'll have to wait.
     
  21. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    hey !
    I am using melee combat with shooting. I am facing an issue that in a script " vCollectShooterMeleeControl" i am passing a game object to RightHandler. Now the issue is default game object position is not good for both melee weapons or shooting weapons. If i set for melee weapons then default pos of that game object is not fit for shooter weapons.
    I am attaching two images hope those images will clear my problem.
     

    Attached Files:

  22. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Any update on AI? No rush :)

    -rich
     
  23. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    310
    I'm having performance problems on my mobile. Will the performance improve in the new version?
     
  24. Mikki

    Mikki

    Joined:
    May 22, 2017
    Posts:
    4
    Is there be a takedown mechanic ?
     
  25. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    hey !
    how to drop nonInventory weapons on empty clip?
     
  26. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    hey !
    i have made my shooting enemy. There is script having a method which decreases the health of enemy. Now I have a problem how to call it. OnDamage event is not giving me desired results.
     
  27. badLifeChoizes

    badLifeChoizes

    Joined:
    Feb 6, 2018
    Posts:
    1
    How did you get invector to work properly with multiplayer networking. I have seen a few examples on youtube of people networking successfully but i have not been able to find any tutorials or instructions. Do you have any advice or example scripts you can share?Do you know of any tutorials or examples I should look into?
     
  28. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Just use different equipHandlers, you can create as many as you want :)

    Working on it... A LOT ;)

    Performance will definitely increase specially with the new AI ;)

    A what!? o_O

    You can create a verification if the rWeapon.ammo.count is equal to zero, call the drop method :)
     
  29. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    106
    Hello,
    I created a NPC using invector melee, but I have a huge drop in framerate when I add it to my scene. If I put 3 at the same time I have less than 5 fps ... an idea?
     
  30. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Take a look at your Console window to see if there is any message
     
    Candac59 likes this.
  31. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    106
    Thanks for support :)


    I created a new player controller and I do not know why but I have no problem framerate.

    Another problem, i have an error in the console but I do not know what it means or how to solve it:

     
  32. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    How handle sounds. i have a slider and on my pause panel. i have to manage the over all game sound effects through this slider how can i do it ?
     
  33. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    when return from pause i used Time.timescale = 1 and the error below is came and my third person is in air.

    navmeshagent.velocity assign attempt for 'GirlCivilian (4)' is not valid. Input velocity is { NaN, NaN, NaN }.
    UnityEngine.AI.NavMeshAgent:set_velocity(Vector3)
    Invector.v_AIAnimator:OnAnimatorMove() (at Assets/Invector-3rdPersonController/Melee Combat/Scripts/CharacterAI/v_AIAnimator.cs:63)
     
  34. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Make sure you have a HUD at your scene ;)

    Try add a if(Time.timescale == 1) to prevent the error.

    That's not necessarily related to the template, it's more like a general game development question that you can find several different answers on google or youtube tutorials.
     
  35. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    106
    Yes i have vHUD
     
  36. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi @Invector
    About your AI will you use some high level tools like BT or FSM ?
    For example have all main code in low level node actions (detection, decisions, actions) and have all the logic branching in some Behaviour graph we could cutomize ?

    For example :
    https://forum.unity.com/threads/a-new-open-source-goap-goal-oriented-action-planner-for-ai.493951/

    This would make your coding separate in functional nodes instead, and debugging in graph, while it would be even more customisable.

    Anyway AI should be an addon considering all the work it asks.
     
    Last edited: Mar 7, 2018
    magique likes this.
  37. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Yes, we're trying something along these lines, and so far things are looking good :)
    most behaviors are done and we're just finishing the node editor... very soon it will all be working together.
     
    magique and zenGarden like this.
  38. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Awesome news :)
     
  39. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Is it possible to make an NPC that's not humanoid?

    thanks,
    rich
     
  40. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    can anybody help me? I do not understand what happens

    NullReferenceException: Object reference not set to an instance of an object
    vHeadTrack.SetLookAtPosition (Vector3 point, Single strafeHeadWeight, Single spineWeight) (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/HeadTrack/Scripts/vHeadTrack.cs:161)
    vHeadTrack.UpdateHeadTrack () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/HeadTrack/Scripts/vHeadTrack.cs:140)
    UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:154)
    UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:637)
    UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:773)
    UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:52)
    Invector.CharacterController.vThirdPersonInput.LateUpdate () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/vThirdPersonInput.cs:133)
    vShooterMeleeInput.LateUpdate () (at Assets/Invector-3rdPersonController/Shooter/Scripts/Shooter/vShooterMeleeInput.cs:100)
     
  41. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Not yet but soon!

    This is happening with a custom character or with the v-bot?
    I think you're missing a neck bone if you're using a custom model.
     
  42. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Hey guys! :)

    So, here's what's new in the upcoming update this month:

    Make sure to backup your current project before importing the new update, this WILL BREAK several integrations and custom scripts mostly because of the namespace change.

    This is the last update before the addition of the new AI Shooter Template ;)
     
  43. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    691
    I am thinking about disabling movement when various HUDs are open, and without stopping time, so the game would continue. If I do this by disableing v Shooter Melee Input, while the HUD windows are open, and reinable when the windows close, will this disrupt the TPCT in any way? If this isn't a good way to stop PC movement of TPCT, what would you suggest?

    Rather than disable the entire script, is the recommended way to do this to enable "lock input," that I see is a check box under the inputs tab?
     
    Last edited: Mar 15, 2018
  44. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    If this is update is a big transition breaking compatibility, would it have been better to wait AI template and one complete update breaking compatibility ?
    Anyway awesome update, keep up the great work :)
     
  45. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    You can use some of vMeleeCombatInput / vShooterCombatInput Events to lock input or the camera.



    We had to release this update because of some important bug fixes that only happen in 2017 or Mac OS.
    The good thing is that with the core updated, the AI will be a simple plug and play in the next update ;)
     
    wood333 and zenGarden like this.
  46. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    691
    So I watched the Unity tutorial on Unity Events, and I figured out where and how to add an event in the Shooter/Melee Input window for my player character. But, I am confused now, because the Unity tutorial says any method that takes advantage of events must have no parameters, but vShooterMeleeInputLockInput has a bool, so, could you please jump me to the head of the class, and show me the line(s) of code to use to invoke the event? If I can see how it's done in your system, I think I can take it from there and make good use of events. Thank you in advance for your valuable guidance.
     
  47. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538

    There is some common features lacking for AI :

    1) max distance from it's original position move.

    When AI moves outside of that distance it runs back to it's origin position or some random position around. This is used in most games.

    2) When not doing a combo choose random unique attack from a defined list


    3) Add the ability to do a powerfull attack among a lits of powerfull attacks (with chance parameter of using it like regular attack)

    4) Random idle from a list

    5) detection radius for other AI fighting
    Add another detection radius to detect when there is some other AI fighting around.
    This could be enabled or disabled, when enabled even if the player is not near enough the AI will trigger to pursue and combat mode if another AI is fighting in the fight detection radius.


    There is many AI issues with melee, for example sometimes standing and facing another direction than player player while they are in combat, or AI is like not fighting and out of combat while player is attacking, the new AI update will be welcome :)


    Meanwhile , i tried a new game setup in some minutes, the plugin is always a breeze to configure and to use :cool:
     
    Last edited: Mar 19, 2018
  48. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    926
    Oh events are Great! In that case, specifically the vShooterMeleeInputLockInput is used with the vInventory OnOpenCloseInventory, so basically it's called like an input changing a bool variable
    "value != value".

    If you want to use simple events with parameters, simply create a public UnityEvent onMyEvent; and call using myEvent.Invoke anywhere you want.

    Very noted and thank you so much for the 5 star review at the asset store @zenGarden :)
     
  49. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You deserve it for your great quality plugin ;)
     
  50. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Just update to new version (without deleting the complete folder) and getting this error:
    upload_2018-3-19_19-13-51.png

    Any idea where this comes from? Didn't get that before? Do I have to create somethin?
     
unityunity