Search Unity

Assets Third Person Templates by Invector

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

  1. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    40
    How about push/pull object and rope climbing in 2,5d
     
  2. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    someone knows how to increase the time request between attack and attack to use the next animation or which script manages that?

    at this time i mean:

    A- - - - -- - - - - (this time to press any button to animation B or do not press and exit)----------------B
    l
    l
    l
    EXIT
     
  3. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    You can create this features using the Generic Action and Events :)



    You can control the timming to press the button by adjusting the transition duration, offset and exit time of the animation directly on the Animator Controller ;)
     
  4. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    40
    tutorial please...or write here
     
  5. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,523
  6. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    This is the tutorial Frax, you can do a lot of interactions with this method.
    Basically it's the same process as the door, but you will play different animations for both player and object.

    Sure thing :)
    We really like your assets @Mister-D, I will make sure to use this model on my next tutorial :p
     
    Mister-D likes this.
  7. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    People are always asking me how to increase the speed of the roll or why the character is not moving when replacing the animation, hopefully this video can teach you how to adjust the distance of root motion animations :)

     
  8. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    40
    but i want push box and moving. it's definitely real wiht the Generic Action and Events?
     
  9. Mohammad1989

    Mohammad1989

    Joined:
    May 26, 2017
    Posts:
    2
    Hi all , in 2.5d Shooter scene when character arrive to the edge of platform, camera angle will change , this happen when the character collide with vChangeCameraAngleTrigger. I add some new lines to it to change camera distance instead of camera angle ,and it make a good zoom change effect , I hope it helps other guys. :)
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class vChangeCameraAngleTrigger : MonoBehaviour {
    5.     public bool applyY, applyX ,Distance;
    6.     public Vector2 angle;
    7.     public float DistanceValue;
    8.     public vThirdPersonCamera tpCamera;
    9.     void Start()
    10.     {
    11.         tpCamera = FindObjectOfType<vThirdPersonCamera>();
    12.     }
    13.     void OnTriggerEnter(Collider other)
    14.     {
    15.         if(other.gameObject.CompareTag("Player")&& tpCamera)
    16.         {
    17.             if (applyX)
    18.                 tpCamera.lerpState.fixedAngle.x = angle.x;
    19.             if (applyY)
    20.                 tpCamera.lerpState.fixedAngle.y = angle.y;
    21.             if (Distance)
    22.                 tpCamera.lerpState.defaultDistance = DistanceValue;
    23.         }
    24.     }
    25. }
    26.  
    regards !
     
    Invector likes this.
  10. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    Hi i'm playing around with melee and the vmansion scene. was wondering how I would keep the lock on ability without the camera moving behind the player?
     
  11. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    Hi I grabbed the swimming add-on and I am definitely pleased with how it works. I recently moved from the Aquas shader to Calm Water and I have applied this to the demo scene and it works well. I have also got swimming mostly working in my own project... however I have a couple of questions.

    Firstly is there a guide on how to setup your own water prefab for this add-on?

    Specifically around underwater swimming. I have my character swimming in an ocean on the top of the water and when they go underwater they start to swim and then rapidly drop to the ocean floor and go into a walk mode.

    What I can see from the pool prefab in the swim demo is that there are a couple of water objects, each with multiple water objects nested in them and I am not sure what this is for or how I should set my own water up.

    One of the frustrating things is that I have brought my water plane from my project into the swim demo and replaced the water in the pool with my water and everything seems to work fine, including underwater swimming so I don't quite get how this all needs to be setup.

    Ultimately a guide on setting up your own water prefab would be great but just some quick pointers in a response here is probably all I need to get it worked out.

    Thanks... and it really is an amazing add-on
     
  12. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    There is a lot of options when talking about dragbox, you can just push forward with limit, push over input, free or into a fixed direction/distance, turn or not, etc... You need to find out what push mechanics you want for your game.
    There is several ways to do it, and the Generic Action with Events is one of them, I would syinc the animation to push the box forward by 1 meter, this is the easiest way but like I say, there is several ways to do it.

    Hmmm You would need to change the vLockOn script to not change the camera, need to some testing but I think it's possible to do.

    You probably forget to adjust the height of the box collider, make sure it covers the height of your ocean just like our Pool has the gameobject water with the tag water and the box collider checked with isTrigger :)
     
  13. J0linar

    J0linar

    Joined:
    Dec 12, 2013
    Posts:
    68
    Hey there @Invector
    just purchased the shooter Template and it really is a nice piece especially the melee System is well done,... Now as am knee deep in production atm am not gonna use invector shooter Template, but i was wondering regarding the footstep System, what needs to be done to use it without the rest of the shooter Template? Any advice would be nice, thx.
     
  14. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    That was the problem.... thanks
     
    Invector likes this.
  15. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    Ok cool thank you.
    I'll experiment too, Ideally i'm hoping to have the choice between locking on to the enemy in that view or just turning the player towards an enemy when they attack/block.
     
  16. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    Hmmm you can grab the folder of the FootStep and add into your project, it will give a few errors about missing script, just select the scripts from the error and import them as well, it should work just fine. We did that to release the Footstep System standalone ;)
     
  17. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    40
    Hi drewradley. I used the above code and it works great when equipping. However when I unequip the armor, the stamina does not return to it's base value. Thanks.
     
  18. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    40
    To answer my own question above I added void OnDestory and that seemed to work:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. using Invector.CharacterController;
    5. public class ArmorControl : MonoBehaviour
    6. {
    7.     public vThirdPersonController myController;
    8.     public int HealthBonus;
    9.     public int StaminaBonus;
    10.     // Use this for initialization
    11.     void Start()
    12.     {
    13.  
    14.     }
    15.  
    16.     // Update is called once per frame
    17.     void Update()
    18.     {
    19.         if (myController == null)
    20.         {
    21.             myController = GetComponentInParent<vThirdPersonController>();
    22.             if (myController != null)
    23.             {
    24.                 myController.maxHealth += HealthBonus;
    25.                 myController.currentHealth += HealthBonus;
    26.                 myController.maxStamina += StaminaBonus;
    27.                 myController.currentStamina += StaminaBonus;
    28.             }
    29.         }
    30.     }
    31.  
    32.     void OnDestroy()
    33.     {
    34.         myController.maxHealth -= HealthBonus;
    35.         myController.currentHealth -= HealthBonus;
    36.         myController.maxStamina -= StaminaBonus;
    37.         myController.currentStamina -= StaminaBonus;
    38.     }
    39. }
    Thanks for the code drewradley!
     
    Invector likes this.
  19. MarcusValerius

    MarcusValerius

    Joined:
    Aug 1, 2016
    Posts:
    12
    Dear Invector Team,
    I am currently testing your free Basic Locomotion asset and I'm having this issue:

    When my character is trying to jump on top of an obstacle and there's another obstacle right behind it that exceeds the character's jump height then it's like he's jumping into an invisible wall.

    My character is somehow being blocked by the object that's behind the obstacle I want to jump on. As if the raycast (I'm guessing that's how you do it.) that is used to detect if there is enough space to jump forward is a bit too long. This may have something to do with the unusual size of my character. Its capsule collider has a radius of 0.09 and a height of 0.35.

    Is there any quick way to fix this?
     
    Last edited: Sep 18, 2017
  20. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    Try using a normal size character, you can resize using the Scale Factor of your FBX.
    Never resize a humanoid character using the transform tool, it will mess up the bone and some colliders calculations
     
  21. MarcusValerius

    MarcusValerius

    Joined:
    Aug 1, 2016
    Posts:
    12
    I don't know if we fully understand each other here.
    My character is meant to be 0.35 units tall. It's intentional, and the scale of all game objects involved is 1,1,1.
    Also, I am not using a humanoid rig. It's custom, and so are the animations. But that should not be of any concern in this case. Root motion is deactivated btw.

    Basically, all I need to know is where (which line in ThirdPersonMotor) you define the checking for obstacles during jumping, so that I may adjust it to something that is more fitting for the size and speed of my character.

    EDIT:
    I figured it out. Had to set the max distance of the CapsuleCast in jumpFwdCondition to something more fitting. Using a fixed value of 0.6f for this, as you have done, is maybe not ideal. Everything should always be dependent on the player's capsule collider's measurements.
     
    Last edited: Sep 19, 2017
    HNSgamer likes this.
  22. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    40
    So I tried the options. The best option is use ladder action. Start push animation - push animation - Exit push animation.
    But if I use a Ladder Action I can't use the ladder. Can you add another action similar to the Ladder Action?
     
  23. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    You can create your own custom actions based on the ladder action or generic action, just change the tag and specifics to fit your need, but the base concept is there :)

    The great thing about this is that is modular, just keep the scripts on a separated folder so when you update the package you won't lost.
     
  24. MarcusValerius

    MarcusValerius

    Joined:
    Aug 1, 2016
    Posts:
    12
    I need your help once more, please.
    What's your advice on temporarily disabling player input on a character that uses your Third Person Template? (I need to make my player character temporarily available for other stuff like cutscenes where it's just supposed to stand around before the player is then given control over it again.)

    So far I have been doing this by disabling the vthirdpersoncontroller and vthirdpersoninput components.
    However, the problem with this method is that if the character is running while the scripts are being deactivated, it will resume running once the scripts are activated again. Like the last received input or velocity are being stored somewhere.

    How do I make it lose any old information so that it actually stands still when I turn the components back on?
    Or is there an even better solution?
     
  25. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    685
    There is a public function that should do what you are looking for.
    Take a look at vThirdPersonInput you can call LockInput(false) to disable player inputs.
     
    Last edited: Sep 27, 2017
  26. MarcusValerius

    MarcusValerius

    Joined:
    Aug 1, 2016
    Posts:
    12
    What I found was lockMovement, and it's in vThirdPersonController. There is no lockInput. But even if you set that to false while running, the character will keep running.
    So what I tried today is to add one more line like so:

    Code (CSharp):
    1. tpcontroller.lockMovement = true;
    2. tpcontroller.input = Vector2.zero;
    And this seems to do the trick and really kill all movement.

    Though, I'd like to get confirmation from the Invector team if this is the ideal way to do it.
    Also, I'd like to ask why the complete input reset that I'm doing in the second line is not already being done? Maybe there's a reason.
     
  27. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    already has support for moving platforms
     
  28. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    685
    vThirdPersonInput.cs no vThirdPersonController.cs ;)

    Input.jpg

    Input2.jpg
     
  29. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    @MarcusValerius try what @sjm-tech suggested, it's the better way since already reset's all the necessary values ;)
     
  30. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    632
    I have noticed that if I pause my scene and then move the Invector PC inside a tall cube, that when I unpause, the Invecor PC is automatically placed beside the cube, rather than within. If you wouldn't mind explaining, is this intentional and how is it done? I ask because I may use a vegetation system that instances trees during run time, and if I could use this technique on my ai creatures, I hope, your technique could automatically move the ai creature outside of the instancing tree collier. This could avoid colliders instancing within other colliders.
     
  31. MarcusValerius

    MarcusValerius

    Joined:
    Aug 1, 2016
    Posts:
    12
    I guess that's only in the full version then.
    I'm not using that one.
     
  32. Stefan86

    Stefan86

    Joined:
    Aug 31, 2017
    Posts:
    53
    Hello .. I have the shooter template of invector and would like to interact with uma .. someone knows how I do?
     
  33. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    40
    DK UMA supports Invector. Though it is a tough system to work with since character are generated at runtime. Morph3d is another alternative to UMA.
     
  34. Stefan86

    Stefan86

    Joined:
    Aug 31, 2017
    Posts:
    53
    thank I know .. had also only Morph3D but with Uma I have more possibilities
     
  35. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    My current approach with UMA is to use DynamicCharacterAvatar and listen for its CharacterCreated event. When this event handler is called the UMA character avatar and skeleton are created and the shooter controller can be initialized.

    I prepare by adding all the needed shooter controller scripts manually into the GameObject with DynamicCharacterAvatar. Setup the controller scripts as much as I can but disable them all.

    In the CharacterCreated event handler enable the shooter controller scripts. Also setup the controller that are normally done with its Editor scripts. Note that the controller's Editor scripts does setup both when a GUI item is invoked and when the scene is run.

    This noticeably increases the startup time. Hopefully UMA creates a feature to save/load with a precreated avatar.
     
  36. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,525
    Hi guys Invector Integration with Horse Animset Pro has being updated to the last version of Invector's templates :)
    upload_2017-10-5_10-40-40.png
     
    antoripa, Invector, wood333 and 2 others like this.
  37. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    Hello everyone
    anyone know how I could force a specific moveset with a script
     
  38. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    304
    Do you have any news about New AI?
     
  39. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    Take a look into the tMeleeInput or MeleeShooterInput script, you could override the method that handles the moveset.

    Yes! we're finally having some great progress with the new AI, more flexibility, easier to expand and great performance
    I will be posting some news and gifs next week
     
  40. Stefan86

    Stefan86

    Joined:
    Aug 31, 2017
    Posts:
    53
    Hello ..
    can someone help me? I use invector with Morph 3D .. and I would like to change the clothes with the inventory ..
     
  41. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    404
    @ Invektor:
    Hi, will you make sometimes a grappling hook addon, would be great. Thank you.
     
  42. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    632
    I'm using Unity 5.6 and the latest Invector Melee/Shooter setup with zoom checked. When my character turns its back to an object, the camera view leaps all the way in to the minimum distance, rather than zooming in just far enough to not pass through the object. I have the melee/shooter character and camera. Is this the expected operation. The leaping in and out is unpleasant.
     
  43. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    We do have plans for a climb and bow add-on, perhaps in the future we can think about a grappling hook, it's a very cool feature to have :)

    Make sure your character doens't have any inside collider with the layer Default which is the culling layer.
     
  44. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    632
    There are no inside colliders. The character is MiximoFuse and the model inspector does not have create colliders checked. There are no colliders other than created by the Invector character setup. I used the Invector character setup, and the Unistorm character setup for Invector.

    The camera does seem to slide smoothly across the ground, but jitters across a speedtree collider or wall.
     
  45. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Hello!

    I am using the Ladder prefab. When I set the auto action checkbox, my player "drifts" forward on the ladder. However this does not happen when auto action is off.

    Thanks,
    rich
     
  46. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    Hmmm that's odd, try record a video showing the issue and email us at inv3ctor@gmail.com to a faster answer

    I just tested the ladder on the demo scene and it's working as expected, try hit the "Apply" buttom there to update the prefab.
     
    wood333 likes this.
  47. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Hi!

    When I use vChangeCameraAngleTrigger (in a 2.5 game) how do I keep the player facing in the original direction? It seems that the player turns to face the camera?

    thanks,
    rich
     
  48. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170


    Hi again,

    I restarted unity, loaded the demo scene and test again - here's what I'm seeing:


    -rich
     
  49. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    875
    Just take a look into the 2.5D shooter demo scene and follow the examples there.
    About the Ladder issue, you didn't mention it was the 2.5D scene and I was looking at the basic :confused:
    But yeah indeed the bug is happening because the update mode of your animator is set to normal, just change to animate physics and it will work!
     
    Last edited: Oct 20, 2017
  50. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi @Invector ,

    It is difficult to mix Melee Template with my own ranged ennemies controllers ?
    - Player can receive damage from magic flying projectile
    - Player can do damage to my own controller scripts

    It is difficult to make Player receive damage per second from danger damaging zones like Lava ?