Search Unity

Assets Third Person Templates by Invector

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

  1. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    Got Swimming yesterday. Any way to change the move speed when in water but not swimming or is that something I need to take care of myself? I want the player to switch from run to walk in water.

    Thanks!
     
  2. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Thanks for clarification.
    I just baught Invector awesome tps plugin, and i'll wait you upload the climb addon to Asset Store :)

    About AI what will you bring ?
    I would expect something more like Destiny AI instead of Uncharted covers. AI able to strafe, able to move around walls or objects to get some cover in standing position.
     
  3. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    Oh and what's the best way to integrate with footstep system? Something that doesn't involve repainting my entire terrain so there is a unique texture under the water that is.
     
  4. haim96

    haim96

    Joined:
    May 24, 2013
    Posts:
    93
    let me help you (and others) with the infinite ammo:
    in vShooterWeapon script, add new public bool for example "ConsumeAmmo".
    then change the following class:

    public virtual void ShootEffect(Vector3 aimPosition, Transform sender = null)
    {
    if (ConsumeAmmo) {
    if (item) {
    var ammoAttribute = item.attributes.Find (a => a.name == Invector.ItemManager.vItemAttributes.AmmoCount);
    if (ammoAttribute != null) {
    ammoAttribute.value--;
    }
    } else
    ammo--;
    }
    this.sender = sender != null ? sender : transform;
    HandleShotEffect(aimPosition);
    }

    hide the ammo amount from the weapon Hud display.

    and for the next update, please! please! please! clean up the code for all legacy code!
    (particles and more) tons of warnings!
    and if someone still using these (besides you) - well, there's fault.
     
    zenGarden likes this.
  5. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    You can create a OnEnterWater/OnExitWater and call the method LimitToWalk() from the tpInput ;)

    We're aiming more for something like MGSV AI, the AI can investigate suspicious activity, alert others, flee, etc... and also the flexibility to add custom behaviours.

    You could disable the footstep if under the water... or yeah paint your terrain to a specific underwater texture lol

    Sure, thanks for your suggestion ;)
     
  6. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    I got the footsteps to work with a little editing. Basically I changed "inTheWater" to public and edited the footsteps script to check it and switch to the water footsteps when true and return to normal operations when false. But I'd like a little more control when it switches to walk in the water then just when he enters the water. Basically, I don't want him to start walking when he's only in ankle deep water but when it gets above his knees (like half way to when he starts to swim) he starts to walk. Thoughts on best way to do that?

    Thanks!
     
  7. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It looks great.
    I like custom behaviours and flexibility :)
     
  8. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    So I now set it up so the player can run into the water, start walking when the water gets to about his knees and then swims at the right level and does the reverse on the way out. Here is the code I added to Update in vSwimming:
    Code (CSharp):
    1.             if (tpInput.cc._capsuleCollider.bounds.center.y - (heightOffset) < waterHeightLevel && tpInput.cc._capsuleCollider.bounds.center.y + heightOffset > waterHeightLevel)
    2.             {
    3.                 tpInput.LimitToWalk(true);
    4.                LimitToWalk = true; //ADD new private bool LimitToWalk;
    5.             }
    6.             else if (LimitToWalk)
    7.             {
    8.                tpInput.LimitToWalk(false);
    9.                LimitToWalk = false;
    10.             }
    Pretty sweet if you ask me. :) Any suggestions?
     
  9. zenGarden

    zenGarden

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

    Will you add support for grass hidding zones for the player visibility ?
    Like "Horizon" game grass where you can hide (with some tolerance distance, when AI is too near it detects the player).

    About flexibility, will you expose player parameters we can alter or change with our own script ?
    - defense and health
    we could want to keep them at max during some time intervall or use items doing different regeneration for example
    - attack
    we could add additionnal points to damage send to AI (used item or tech or permanent attribute bonus)
    - damage received from ennemies
    cancelling or reducing (using item or tech or permanent attribute bonus)
    - player not detectable by ennemies
    for some time intervall, invisibility like tech using item or tech.
     
    Last edited: Nov 27, 2017
  10. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    Hello again.

    I have a problem. I can not find a way to control the time in which the weapon is shown in the holder after changing it to another

    and I do not encunetro how to put weapons in the holder under certain events.

    Thank you in advance. regards! :D
     
  11. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17


    sorry. I could solve the problem, it was a mistake with the Holder. thank you anyway

    by the way, when will we see more news about the bow system and improvements to AI?
     
  12. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    309
    Please let me know about the new AI.
     
  13. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Those are very specific requests, let's just release the AI first and them we can see were to go xD

    Open the ItemList and change the Equip Delay Time of your weapon ;)

    Soon we will post some news about both :)
     
    Luistrotamundos and zenGarden like this.
  14. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    I had a problem with FootStep script, it happens every time I change the scene

    NullReferenceException: Object reference not set to an instance of an object
    vFootStep.GetMainTexture (Vector3 WorldPos) (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/FootStep/Scripts/vFootStep.cs:111)
    vFootStep.StepOnTerrain (.FootStepObject footStepObject) (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/FootStep/Scripts/vFootStep.cs:132)
    vFootStepTrigger.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/FootStep/Scripts/vFootStepTrigger.cs:41)
     
  15. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    sometimes this other one accompanies him that is worse because the camera does not show the character, but I do not find an apparent reason any suggestion?

    NullReferenceException: Object reference not set to an instance of an object
    vThirdPersonCamera.CameraMovement () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Camera/vThirdPersonCamera.cs:468)
    vThirdPersonCamera.RotateCamera (Single x, Single y) (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Camera/vThirdPersonCamera.cs:405)
    Invector.CharacterController.vThirdPersonInput.CameraInput () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/vThirdPersonInput.cs:335)
    Invector.CharacterController.vThirdPersonInput.LateUpdate () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/vThirdPersonInput.cs:141)
     
  16. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    658
    Would you kindly direct me to the forum and documentation for the Third Person Swimming Add-on. Merely adding this asset to my project folder is disrupting a modest test scene that runs just fine containing a terrain, your Shooter, Weather Maker, Ultimate Water and Realistic Eye Movements. Scene locks a few times, then the water disappears.
     
  17. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Are you using Unity 2017.2 by any change? we're having several complains on this version specially with Mac users

    * WARNING UNITY 2017.2 BUGS *

    Stick with 2017.1 for now, several users already reported bugs not only with our template but other assets on 2017.2

    Here you go:
    http://invector.proboards.com/thread/597/official-add-on-swimming

     
    wood333 likes this.
  18. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    I am using the 2017.1 version
     
  19. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    658
    Thank you for the link. I am using Unity 5.6.3f1
     
  20. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    probe with version 5.6.4 and the problem persists.

    NullReferenceException: Object reference not set to an instance of an object
    vFootStep.GetMainTexture (Vector3 WorldPos) (at Assets / Invector-3rdPersonController / Basic Locomotion / Scripts / FootStep / Scripts / vFootStep.cs: 111)
    vFootStep.StepOnTerrain (.FootStepObject footStepObject) (at Assets / Invector-3rdPersonController / Basic Locomotion / Scripts / FootStep / Scripts / vFootStep.cs: 132)
    vFootStepTrigger.OnTriggerEnter (UnityEngine.Collider other) (at Assets / Invector-3rdPersonController / Basic Locomotion / Scripts / FootStep / Scripts / vFootStepTrigger.cs: 41)
     
  21. xercool

    xercool

    Joined:
    Sep 5, 2017
    Posts:
    90
    What about Inventory pro integration?
     
    wood333 likes this.
  22. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    I have encountered a strange bug where standing on terrain prevents lock-on on certain targets. It works fine for AI but for the punching bag and anything else with Character Standalone the only way to lock-on is to do so when in the air or when on something other than terrain.
     
  23. zenGarden

    zenGarden

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

    I was testing the controller in some stress test level.
    The frame rate gets 10 fps drop when we enable more scripts and have character walking.

    Stationnary , only two scripts enabled.


    All scripts enabled and walking



    I changed some code in vThirdPersonControllerbut it has no impact really visible on performance.

    Code (CSharp):
    1.         protected IEnumerator UpdateRaycast()
    2.         {
    3.             while (true)
    4.             {
    5.                 yield return new WaitForEndOfFrame();
    6.                 frameCount += 1;
    7.                 if (frameCount > 20) {
    8.                     AutoCrouch ();
    9.                     frameCount = 0;
    10.                 }
    11.                 //StopMove();
    12.             }
    13.         }

    Is difference normal and related to number of scripts and physics functions calls ?
    Why not adding a pooling system for footsteps and other effects.


    BTW, i added HUD prefab from Basic Locomotion -> Ressources and it works fine.
    Adding Vlockon , the game starts , but after some seconds it shows a "out of range" Unity error.
    How to enable Vlockon and what HUD should i use to not get this error ?
     
    Last edited: Dec 5, 2017
  24. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Try this, open the vFootstep and find the method GetTextureMix and add the following verification:

    Code (CSharp):
    1.  if (terrain == null)
    2.         {
    3.             terrain = Terrain.activeTerrain;
    4.             if (terrain != null)
    5.             {
    6.                 terrainData = terrain.terrainData;
    7.                 terrainPos = terrain.transform.position;
    8.                 terrainCollider = terrain.GetComponent<TerrainCollider>();
    9.             }
    10.         }
    Take a look here > http://invector.proboards.com/thread/692/inventory-pro-2-5

    Hmmm strange I just tested here with the punchbags and a terrain very deformed and it's working as expected, can you record a video showing your issue?

    Well... the more components you're character has, more methods will run and more performance will be consumed.
    Specially when using the Headtrack, Ragdoll and others.

    The Lock-On just need a Canvas in the scene to work, nothing more ;)
     
    zenGarden likes this.
  25. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Yep.

    I also had a hard time figuring out frame rate drope , and it was due to some plugin not supposed to have a nasty scene database scripts running in game play test, making the huge frame rate drops.

    Invector is nice and not impacting on frame rate





    But still i don't like seeing game objects continously created and destroyed( footsteps, sounds, effects), while in proper game coding usage they should be pre loaded and used in some pooling system :rolleyes:

    Will you add a pooling system for plugin game objects instead of actually create at run time ?
     
    Last edited: Dec 5, 2017
  26. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    I've checked on the base project and it's not happening so it must be something I've changed. I'll investigate and see what I've done that might be interfering.
     
  27. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,061
    Definitely something going on. Works fine with your character but not my own. Not sure what is different and I followed the videos, but for some reason my own character doesn't lock on properly.

    edit: if anyone else has this problem, I got around it by simply copying and pasting the components from the supplied character one at a time and it works fine. No matter how often I made a new one with the creation tools, they simply didn't lock on correctly.
     
    Last edited: Dec 8, 2017
  28. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    40
    Getting this as well using 2017.1. any work around yet Invector? I have been using an older build of Invector for about 3 months with 2017.1, everyday, and this has never happened. I updated to the latest build of Invector and this keeps happening when I change scenes(it's random). The camera focuses on the Player and does not follow him, then it spams the error above. Hope this helps to track down the issue.
     
    Last edited: Dec 11, 2017
  29. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Hmmm I didn't get this error... but make sure the Field of View of your CameraState is higher then 0. (default is 60)
     
  30. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    40
    It is set to 60 any idea?
     
  31. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Hi there :)

    Please send me your invoice number, I will send to you our latest tpCamera script so you can test if the error is gone.
    Btw, can we get a preview of your game? :)

    Best,
    Invector Team
     
  32. retired

    retired

    Joined:
    Jan 13, 2015
    Posts:
    40
    Ok will do, thanks!
     
  33. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Coming soon on the next update version 1.1.5 only for the Shooter

    - Archery Support added
    - Collectible Arrows (fire and recovery the arrow)
    - Left Weapon support (only for arrow)
    - Penetrate objects
    - Hold the input to do charge the arrow and do more damage
    - Add a charge weapon, auto shot, auto reload and lot of more options in the ShooterWeapon component







    - Grenade Launcher support added
    - Charge Shot and Secondary Input Shot added (see gif below, animated shader included on the weapon)
    - Different projectiles can be shot based on how much you charge the weapon (in this example we have 3 different explosives, single click trigger 1, charging a little trigger another and charging to the max shots a more explosive grenade)





    Q: Why Archery support only for the Shooter?
    A: Because the aiming system and IK system are included only on the Shooter Package.

    Q: Are those new features Paid Add-ons?
    A: Nope! Free update content ~enjoy ;)
     
    Last edited: Dec 12, 2017
    antoripa, zenGarden, magique and 2 others like this.
  34. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Awesome nice work ;)
     
  35. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Great update until AI comes in the plugin :)
    Do we have some option to switch to Fps view when aiming with the bow ? Zelda like.
     
  36. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    Sure you can use the scope view feature just like any other shooter weapon ;)
     
    zenGarden likes this.
  37. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,111
    Upgraded from 2017.2f3 to 2017.3f3 - So far Punching Melee and roll animations are looping on the current asset store build of Shooter template, once you click to punch once they do not stop. Some changes to animation system, may have caused this?

    edit: just checked your website forum and you are aware of it.
     
    Last edited: Dec 21, 2017
  38. Disgrind

    Disgrind

    Joined:
    Jul 3, 2017
    Posts:
    2
    This bug is beginning to delay me a lot in the project, because even if I change the values of the camera from 60, to 65, or even lower it to 50 ... it fixes a moment and then fails again, if a solution exists From the scrip, I would greatly appreciate your help, in advance thank you very much for your attention.


    NullReferenceException: Object reference not set to an instance of an object
    vThirdPersonCamera.CameraMovement () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Camera/vThirdPersonCamera.cs:468)
    vThirdPersonCamera.RotateCamera (Single x, Single y) (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Camera/vThirdPersonCamera.cs:405)
    Invector.CharacterController.vThirdPersonInput.CameraInput () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/vThirdPersonInput.cs:335)
    Invector.CharacterController.vThirdPersonInput.LateUpdate () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/vThirdPersonInput.cs:141)
    vShooterMeleeInput.LateUpdate () (at Assets/Invector-3rdPersonController/Shooter/Scripts/Shooter/vShooterMeleeInput.cs:102)
     
  39. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    That's a nasty bug that we already fix but I don't remember right now what we changed, send me a PM with your invoice number and I will send you the update camera script.
    The update with this fix and a loooot of exciting new features is coming very soon!
     
  40. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    FreeClimb Add-on Now available at the AssetStore

    www.assetstore.unity3d.com/en/#/content/105187

    btw the Beta will end as soon as the next shooter update 1.1.5 hits the store
    Now with support for stamina consumption, improved corner detection and climb on movable objects!

     
    Malbers and sjm-tech like this.
  41. Disgrind

    Disgrind

    Joined:
    Jul 3, 2017
    Posts:
    2
    Already send the message with the number, in advance thank you very much for your attention ... let's hope everything goes well
     
  42. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    658
    I'm getting an error on a fresh instal of Shooter into U 5.6.3f1.

    Assets/Invector-3rdPersonController/ItemManager/Scripts/vAutoScrollVertical.cs(31,39): error CS1061: Type `UnityEngine.UI.ScrollRect' does not contain a definition for `viewport' and no extension method `viewport' of type `UnityEngine.UI.ScrollRect' could be found (are you missing a using directive or an assembly reference?)

    Looks like:
    viewport.JPG

    Any suggestions?
     
  43. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    904
    I'm not sure where did come from that public RectTransform viewport; we don't have that line here.
    Try re-import the project to see if it updates.
     
    wood333 likes this.
  44. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    658
    Turns out I had imported the Shooter into a Unity 5.1 version by mistake. I opened the project in Unity 5.6 and let it update. The script error was fixed.

    To be safe, I then deleted TPCT Shooter from the project and re-imported. The script error did not reappear. The only red console entry is:

    Assertion failed on expression: '!(name.size() == 1 && name[0] == '/')'

    Which I believe is not fatal.

    There are 268 warnings.

    1. Lots of animation import warnings.
    2. Some no mapped GUI warnings.
    3. Some items flagged obsolete warnings.

    I expect all these warning to vanish once I clear them or hit play, with some warnings I expect to remain in the inspector for some of the animations.

    That's all I have to report right now. I will be importing Emerald 2.0 and Inventory Pro next. Should be interesting. Official integrations for these would be fantastic.

    Love TPCT, keep up the great work!
    Happy Holidays :)
     
  45. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Hello!

    How do I move the player to a new position/rotation? I have several cutscenes and I need the player to be at a certain mark and looking at certain objects.

    I am using Playmaker and tried all the Move To actions but none of them will move the player.

    Any suggestions?

    thanks,
    rich
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
    Is there a video showing this add-on in action? It's hard to tell just exactly what we are getting with this add-on without seeing it in action.
     
    zenGarden likes this.
  47. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    695
    Here two Gif from the Invector official forum:


     

    Attached Files:

  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
    Those are just static jpg files in your post. Do you have a link to the original post?
     
  49. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    695
  50. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Great demo scene :)
    Is there some option to prevent the character to climb surface that are greater than 90° angle ?
     
unityunity