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

Controller Third Person Templates by Invector

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

  1. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Couple screen captures of my project. Worst and Best gear in the game. Well, haven't added any other shields yet
     

    Attached Files:

    PIGame, Invector and kidling like this.
  2. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    And one more because who HASN'T wanted to go on a dungeon run with a pink tutu and a beer keg on a stick. What? That's just me?
     

    Attached Files:

    Invector likes this.
  3. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Worked on my level a bit, have not got the skeleton models yet so no ai but I have death traps and FISH, goal is to add a cemetery along side the walk. Should be fun.
     
    PIGame and Invector like this.
  4. TripleSmash

    TripleSmash

    Joined:
    Mar 19, 2016
    Posts:
    10
    For some reason, character wont move, he will just stay in the same spot even though animation of running will play :/ any ideas why this may happen?
     
  5. rbm123

    rbm123

    Joined:
    May 24, 2015
    Posts:
    130
    @Invector
    I have an Idea for Spell Casting!(but I cant do this:p)
    ///sorry for my bad english//;)
    for Example you can say that when player push "1" character play an animation and a particle (spell casting animation and fire particle) . the particle just plays on player and it's not going to jump to enemy ! in the same time or a few frames later(to make it nicer!!:)) the enemy which is player's target (have point on the head) plays an animation and a particle!(spell hitting animation and burning particle) and then his/her damage reduced! also you can reduce mana on player! and also you can make healing spell too!
    this is a pack which contain all the animation you need!
    https://www.assetstore.unity3d.com/en/#!/content/36269
    its free!
    ------------
    I think also it is easy to make a wizard for make spell! some field to take animation , particle , damage type , name,.... etc
    -----------
    its just an idea:cool:
     
    Invector likes this.
  6. Pat19645

    Pat19645

    Joined:
    Apr 17, 2014
    Posts:
    14
    Is it possible to open doors when pressing 'e',or with a key? or even talk to another character with the actiontrigger?
     
  7. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    What system/method/how are you attaching armor to your character? are you making the pieces from scratch?
     
  8. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    lol that's a lovely option to face dragons :p

    did you change the running animation? make sure that it has root motion, if not you can add a value on the extra move speed.

    nice idea for the folks who are making a rpg or magic focus game, great tip!

    Yep! just add a new tag and make the verification on the InteractInput method at the ThirdPersonController.
     
    Pat19645 likes this.
  9. TripleSmash

    TripleSmash

    Joined:
    Mar 19, 2016
    Posts:
    10
    Haven't changed a single thing. I'm trying to use this on the Unity blacksmith character. However when I use the tool on other characters, it works completely normal. :/

    (same thing happens in a fresh new project in Unity)
     
    Last edited: Jun 14, 2016
  10. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Make sure you have Apply Root Motion checked on the animator on the model.
     
    Invector likes this.
  11. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi Guys for those who Use Horse Animset Pro and Invector, there're some changes in this new version 1.3c. Just change on the InvectorCompatible.cs InitialSetup(); for Init(); and that should solve the problem. I'm already uploading this tiny fix.

    Cheers Malbers
     
    Dionysos1111 and Invector like this.
  12. TripleSmash

    TripleSmash

    Joined:
    Mar 19, 2016
    Posts:
    10
    Thanks, that fixed it!
     
    teresathomasva likes this.
  13. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Having trouble getting "Lock on" to work on enemies from a different AI. I looked through the code and it looks like all they need is to be tagged correctly which they are. Is that correct or does it need a specific component attached before the lock on system will recognize them as valid targets? They do have multiple colliders on them so perhaps that is confusing the system.
     
  14. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    You just need to make sure that the primary collider has the Tag Enemy or whatever the tag you assign on the LockOn Component. Also, it needs to have a vCharacterStandalone to know if the target is alive or dead.
     
  15. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    That's what I'm missing! Works fine now. Thanks!
     
    Invector likes this.
  16. jbooker410

    jbooker410

    Joined:
    Mar 9, 2014
    Posts:
    41
    will the shooter template also contain a melee system when it comes out?
     
  17. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Can anyone help me with increasing sprint speed? (not running)
     
  18. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    Hi Invector,

    Is it possible to toggle on / off the turning left / right and have strafing on with full movement speed?

    Thanks!

    DZ
     
  19. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Yep!

    The easiest way is to change the animation speed directly on the blendtree animation state, the hardest is to edit the Z axis curve line by openning the animation on a 3D editor (maya, blender, etc)

    Just change the Locomotion Type to Strafe Only at the Player Inspector ;)
     
  20. rbm123

    rbm123

    Joined:
    May 24, 2015
    Posts:
    130
    no preview for shooter template?

    does it have cover and shot?
     
  21. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    I thought I tried that and movement slowed down to the Locked On speed but I'll try it again and see what happens. Thanks for the response. -DZ
     
  22. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    When i attach the vMelee Attack Behavior script to the Mecanim state (box that contains the animation) like it is suppose to be i lose the ability to change directions in mid combo during free movement. For instance if i press forward and attack the player will attack forward. If i press 'A' for the character to face left and press attack the character simply attacks forward unless i completely stop the combo and start over from the first move of the combo. How i can make it so that i can change directions in the middle of a combo to make it a bit more responsive in free movement mode?
     
  23. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    That's because our strafe animations are pretty slow, just simple walking animations
    I prepare a simple pack with free jog strafe animations from mixamo for you guys. [Download]

    On the method FreeMovement at the TPMotor, there is an if(inAttack) return; this line is responsible to remove any movement during the attack. You can remove it, but it will allow full movement during all the attack.

    Or on the vMeleeAttackBehaviour that informs the motor if the player is attacking and when it finishe, you can make a if like this at the OnStateUpdate:

    // if the animation state time is bigger then x
    if(stateInfo.normalizedTime > xxf)
    // say to the motor that the player has finish the attack and let the player move again
    animator.gameObject.SendMessage("OnAttackExit", SendMessageOptions.DontRequireReceiver);
     
  24. Shadex

    Shadex

    Joined:
    Dec 18, 2013
    Posts:
    89
    Thank you so much. This was being being a huge roadblock and i couldn't figure it out. The code, as usual, works perfectly. I just made the variable public as this really makes free movement combat feel great if you time it with an attack intended for root motion.
     
    Invector likes this.
  25. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Indeed it's a good improvement to the gameplay, I will add this on the next update :p
     
    jgiroux likes this.
  26. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    No no...i meant to say i want to increase the speed of going forward while my character is in Sprinting.. Not to increase the animation speed :p
     
  27. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    With Root motion, changing the animation speed will also change the forward speed. Example, a 30 frame walk that moves you 3 units will move you 3 units in one second at normal speed, double the animation speed and it will move you 3 units in half a second, thereby doubling the movement speed. Just trying to speed up the player without speeding up the animation will result in "skating".
     
  28. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    @HR0THVITNIR I did you modification here and make some improvements on my own, and results are pretty good :D, this feature will be include on the update next week! thanks for share your mod, it make me curious and now we have a nice turnonspot while strafing :p

    edit* Wow I send the new package today and the asset store already approve o_O


    v1.3d Changelog
     
    Last edited: Jun 16, 2016
    Malbers likes this.
  29. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    My heart almost stopped when I saw an update. Thought it was the first Shooter preview :) loll

    But good quick fix though !!!
     
    xxhaissamxx likes this.
  30. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Having trouble getting the companion AI to find the player when the player was spawned into the scene. It seems they find the player in the start function. I tried to spawn the companion after the player but they think there is no navmesh (there is) and die. I also tried to set up an update to find the player but that doesn't seem to work either. Any thoughts?
     
  31. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    It seams that today (Thursday) is approval day.... they update mines two :)
     
  32. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    Thanks for this pack of jog animations. I implemented them into strafing for unarmed and armed blend trees and they are very nice. Sometimes the character and camera gets off target though. I believe it was just the strafe rotation setting as that seems to have fixed it but is there a distance where lock automatically comes off?
     
  33. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Well thanks for answering, but i'm using custom animations instead...
     
  34. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Don't they still have root motion? I thought this kit needed to use root motion for the movement animations.
     
  35. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Maybe it's the camera follow speed, select your strafe camera state and increase the follow speed value.

    Not necessarily, we do have 2 fields on the player inspector call Extra Move Speed, it goes for the strafe movement & the free movement states and apply a force to the transform, so you can put inplace animations there if you want to
     
  36. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    But i think doing so will also increase the walking and running speed....but i only want to increase the sprinting speed.....Also one thing more...even i can't understand what i'm saying, so once again sorry for my very poor english
     
  37. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi Invector,

    I notice there is many parameters for the different components (camera, AI, Player ...etc) but there is no document describe what every parameter values do?

    So where can we find that?

    Thanks.
     
  38. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Just hover your mouse over desired parameter....It'll describe the parameter and it's results........
     
    Invector likes this.
  39. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I'm assuming that your animation has root motion, you can just increase the speed of your animation on the blend tree



    If you animation does not contain rootmotion, then it will need further moditications on the code... but really, it's way easier just to replace/edit your animation :p
     
  40. Michael316

    Michael316

    Joined:
    Aug 2, 2012
    Posts:
    21
    Sorry if this has been asked and answered - I didn't see a definitive response: will the shooter be a paid upgrade from the Melee Pack? Just wondering if I should buy this now and upgrade when Shooter comes out, or wait for Shooter. Thanks!
     
    johny256 likes this.
  41. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    also I am waiting for this answer!!wait for the shooter or buy now ?
     
  42. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Alright I'll try....Thanks....but there's more to ask ..o_O...if i disable vThirdPersonController script from my character prefab..the camera stopped to rotate around my player, but it's following player....i need to disable your controller for my fly controller to work but keep the camera working as it is.....is that possible? is the camera script depends on vThirdPersonController?
     
  43. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    @Michael316 & @johny256 you guys can choose to upgrade later, just like you can do for the Basic to the Melee ;)

    Yep! The TPController controls every input, check the CameraInput.
    You can simple use the bool lockPlayer to lock every input of the player and the camera continues to work
     
  44. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    Lockplayer bool?....can you please explain further? do you mean Lock Camera option?...it makes the camera rotate WITH my player, but not rotating with mouse around my player like it does with your controller
     
    Last edited: Jun 19, 2016
  45. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @Invector
    It is easy to use the plugin with or own custom character rig and animations ?
     
  46. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Instead of disabling the TPController, just turn on the bool lockPlayer, it will lock all input of the controller but the camera will still work normally.

    That's a weird question to ask for someone who's being following this topic since page 1 o_O
    But yeah, as you can see on our videos, it's literally a few clicks to replace any humanoid model, and to replace animations you just need to open the animator and replace the animation you want... depending on the animation you have you may have to tweek some exit time transition, but I would say that is very easy to use :p
     
  47. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I only followed features, i never digged how it worked on the workflow side of things unfortunatelly.

    Good because i'll use custom rigs and animations.

    It is possible to add double jump and air dash ?
    About melee combat are possible for the player and AI :
    - two hands weapon attack
    - two hands weapon block (blocking value based on weapon stat (total or constant value)
    - shield attack
     
    Last edited: Jun 20, 2016
  48. Vibhanshu

    Vibhanshu

    Joined:
    Aug 7, 2014
    Posts:
    24
    How to do that?..via scripting..?.....i know how to code in javascript only...can you tell me how to turn on lockPlayer bool?
    EDIT UPDATE - Thank you man !!...i've turned it on and change extraGravity to false....now it's working as i want it....thanks again
     
    Last edited: Jun 20, 2016
    Invector likes this.
  49. carlosrovira

    carlosrovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Hi @Invector Many thanks for the push/pull feature! I couldn't take a look until some days ago since I was off, but I think it works amazing! Great Work!, And sorry to not catch the messages in this forum, I didn't get any notifications until now.

    Many thanks for such great update!! :))
     
    Invector likes this.
  50. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    Hi Invector, I had written a post about my problems with jumping but I guess I made some mistake and it didn't upload.
    Oh well, here again.

    I would like a brief description of how the jumping works in the plugin because it doesn't seem to be effected by gravity.
    The fall is very floaty even with a gravity physics setting of -20 and the default Mass on the rigidbody set to 50.

    I played with the controller settings Extra Gravity and Jump Force and obtained a jump similar to what I would like with both of these set to 17. ( both xtraGravity and Jump Force)
    But I still have the problem that when the character stops rising he stops abruptly like if he had hit a ceiling with his head (ouch !) . I would like a more natural transition from rising in the jump and then falling.

    I was used to transition from Jump to Fall using the VerticalVelocity of the rigidbody but I see that your way of transitioning doesn't use it.
    thanks for any help you can give.
    pietro

    P.S. I vote for double jump too. If you guys could do it I would save a lot of time.