Search Unity

Controller Third Person Templates by Invector

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

  1. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Layers are very important to be set up correctly, you see the Player and his children gameObjects must be set as "Player", the ground can use a different layer from "Default" but you must assign it in the Controller > Ground Layer, otherwise it will fall through, and the Camera uses the Culling Layer as obstacle, the default layer is "Default", so every object that uses default will be cull.
     
  2. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Any new updates coming to the TPC?
     
  3. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Terrain - Layer Set To = Terrain
    Ground (in controller) - Layer Set To = Terrain

    Player & Children - Layer Set To = Player

    RESULT = Character falls through the floor/terrain.

    Player (main gameobject) - Layer Set To = Default
    Children - Layer Set To Player

    RESULT

    Character works okey and doesn't fall through the floor.

    Culling Layer ios curently set to (new layer created ) Culling Layer.
    I have tried using Culling = Default Leyer .... Makes no difference (as far as my current use and configs are concerned).

    The same happens in the demo scenes.
     
    Last edited: Oct 9, 2019
  4. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    Do you have Terrain/Player interaction enabled in your Collision Matrix?
     
    Hawk0077 likes this.
  5. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I dont believe so based on my understanding. Which isnt a lot in these cases.
     

    Attached Files:

    Last edited: Oct 9, 2019
  6. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    Yes, so you need to check that and can just keep the entire player on the Player layer, and it wont fall through if you have the Terrain layer defined in the TPC ground.
     
  7. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    When I select the checkmark Player /Terrain after I press Play the checkmark gets deselected?
     

    Attached Files:

  8. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    Then that means some script in your project is disabling the collision between the two layers. You need to check for Physics.IgnoreLayerCollision in all the scripts in your project.
     
    Hawk0077 likes this.
  9. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, much appreciated.
     
  10. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi, I am trying to get the rights analog stick (xbox360 controller) to return to the center position of the character AFTER I make a camera movement up or down.

    For instance if I move the right stick to the right then let go, I have to use the right stick to return to the center position.

    I realise that there is a camera follow script but that makes the right stick inactive and so having the right stick return to center after a movement would be better if it can be done.

    Is there a piece of code I can add somewhere to get the camera to behave this way?

    I thought I found the SNAP checkbox in the input settings and that it would do this automaticaly but it doesnt work.

    Any ideas? thanks
     
  11. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Anyone getting this creating a new Item Handler? I've been able to move components up and down in order to see the new drop down handler but cant on this one.
     

    Attached Files:

  12. junaid_techving

    junaid_techving

    Joined:
    Jul 16, 2018
    Posts:
    2
    Hi ! well you are doing great ...
    I just want to extend the behaviour of Third Person Controller and NPC/AI. I want to perform grapple damage in which Third person Controller and AI Controller both behaviours will have to extend. So do you have any solution regarding to it?
     
  13. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi Team - Having trouble adjusting the right hand on the bow setup. => Shooter Manager => IK => Right Hand but I don't see field to adjust? Probably missing something.
    Thanks!
     
    SickaGames1 likes this.
  14. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Don't know about this - I removed component then set back up and now visible. No biggie- Happened a couple times.
     
  15. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi, is there a way to get the camera look (using right joystick of 360 controller) to return to the behind the character view automatically. Si that if I am in a car or on a horse for instance and look to my left or right, the camera snaps back to the original behind the character view?

    Any ideas how this can be or is c=done would be appreciated, thanks

    Oh for an example I believe Forza does this and the latest Grid game and many others besides. Much appreciated, thanks.
     
  16. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    how to do when my AI companion suddenly takes that signal on the screen with the image damage
     
  17. scumprince

    scumprince

    Joined:
    Sep 30, 2019
    Posts:
    3
    Hello there. Don't understand how to setup combat scene. I create melee controller, then I create Simple AI, and It should just work? Now enemy chasing the player, but player can't attack him and enemy doesn't attack as well. Ive checked documentation and vids, but can't find combat setup.
     
  18. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    It's not a feature included out of the box, but you could use the 'lockCamera' option of the tpCamera to 'reset' to the characters back.

    I'm sorry but I didn't quite get your question, is the damage image being triggered by the AI Companion?

    Check your layers, all the information about setuping layers and tags to apply or receive damage are available in the documention
     
  19. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    When is the next version of TPC coming out?
     
  20. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Pretty soon 1-2 weeks, get ready for some changes!
    After this release, we will focus on a new series of video tutorials ;)

    Here is a preview of the changelog

    Shooter v2.5.0 CORE UPDATE & New Features - xx/11/2019

    - Project upgraded from 5.6.2 to 2018.4.12 LTS with all the warnings regarding deprecated variables are now fixed
    - Big jump from 1.3.2 to 2.5.0 to match other versions of the template
    - Add new Welcome Window - Make sure to import the 'ProjectSettings' after you import the package
    - Change Mobile, Topdown, 2.5D, ClickToMove and the vMansion examples are now separated add-ons and can be install from the WelcomeWindow/Add-ons
    - CORE UPDATE - new methods to Move and Rotate the Character it's now much more fluid
    - CORE UPDATE - tpMotor, tpAnimator, tpController, and tpInput was improved and restructured, check the documentation to see the flowchart demonstrating the new structure
    - Improved 2.5Input scripts are no longer needed, now you just need to overwrite the methods ControlLocomotionType and ControlRotateType to create new Controller styles
    - Improved 2.5Shooter Aim to be more accurate with the cursor position
    - Improved ClickToMove with better target selection and collision detection
    - Improved Ladder System, now supports inclined angles, new ladder model with each step set to 0.5f of height, add ClimbSpeed & FastClimbSpeed with an option to consume stamina
    - Add New Animations for the Ladder System and better match target to entry and exit
    - Add 'AutoReload' option for Shooter Weapons - automatically performs a reload if there is ammo left
    - Add 'DontUseReload' option for weapons that use a single amount of bullet 'xx' instead of 'xx/xx'
    - Add transition to Sprint if you're Crouching
    - Add 'SprintOnlyFree' option to switch to free locomotion while sprinting
    - Add 'UseLeanAnimations' option to use the lean left/right animations while turning on free locomotion, disable it when using a TopDownController
    - Add 'RotateWithCamera' option to each LocomotionType (Free or Strafe) to make the character Rotate with the Camera forward while standing still
    - Add 'MovementSmooth' and 'AnimationSmooth' values for each LocomotionType (Free or Strafe) to have better control of the smoothness you need when moving the character or the locomotion animation speed
    - Add Roll options such as UseRollRootMotion, UseRollGravity, RollSpeed, RollRotationSpeed and TimeToRollAgain
    - Add vAnimatorParameters to manage all the animator parameters and convert string to hash to increase performance
    - Add new parameters 'IsSprinting' to the animator to know if the character is sprinting or not (useful to create directional transitions)
    - Add new options for the Jump/Airborne you can now use the current Rigidbody Velocity to influence on the jump speed direction
    - Add 'Jump and Rotate' to rotate while jump/airborne, 'AirSpeed' to control the speed while jump/airborne, 'AirSmooth' to control the smoothness
    - Add 'Velocity Multiplier' option for the Ragdoll, it gets the current velocity of the character rigidbody and applies to the ragdoll when enabled, creating a more realistic transition
    - Fix Reloading when having ammo in the current clip but no ammo left
    - Fix bug when entering the ladder and some animations didn't reset (ex: aiming, crouching, blocking)
    - Fix Ragdoll Component not being added when creating a ragdoll, now all the colliders are set to CollisionMode Speculate
    - ADD-ON Swimming now has an input to swim up/down, demo scene improved with generic action climb instead of the old system to exit the swim
    - Removed XInput.dll from the project
    - Removed vCharacterStandlone, use vHealthController instead

    And here is a preview of the new structured we did for the core scripts:

     
  21. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    A new inventory GUI? :)
     
  22. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @Malbers FYI on an updated controller.
     
  23. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Invector likes this.
  24. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @Malbers Can you do a new tutorial for this once it comes out? Thanks!
     
  25. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    SickaGames1 likes this.
  26. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    the question is this: how to do when my CompanionAi takes shots, that I see it on my screen with the signal of a red image?
     
  27. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    please how to fix outdated Application.loadedLevelName
     
  28. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Oh it's simple you can use the Event OnReceiveDamage to active an Image UI
    What version of Unity are you using?
     
  29. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    thanks but after having put the red photo of damageImage which is on vUI in OnReceiveDamage and now which function must put?
     
  30. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    I have an error while importing the script vfireprojectile on my project directly an error message, help me please to correct this error:
    vFireProjectile.cs(24,63): error CS0246: The type or namespace name `vLockOnTargetControl' could not be found. Are you missing an assembly reference?



    Capture d’écran 06-11-2019 23.29.11.png
     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It will no longer on anything before 2018.4.12 LTS?
     
  32. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I have a couple of issue I need help with thanks.

    First, is there a way to stop camera going through trees, walls and objects? I tried changing the clippins, adding wall clip, and several other methods but nothing works. Any ideas appreciated, thanks.

    Second, I have the default state for walking around and want to change to another state when I get on a horse so I can change the distance. How do I do that and is there a script that will do it.

    Many thanks.
     
  33. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Yep, it's time to move on and enjoy the new features and bug fixes from the new versions of Unity ;)

    1- Check the "Culling Layer" of your tpCamera, the default is "Default" so if your objects are using a different layer it won't be culled.

    2- You can use the method ChangeCameraState from the tpInput to set a different camera state when riding a horse.
     
    Hawk0077 and Malbers like this.
  34. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    What version are you running? we have a "vFireProjectile" in the project today :confused:
     
  35. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Can you check the publisher forums and see what the percentage of Unity developers is on newer versions versus older versions?
     
  36. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
  37. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    In a world where your project only contains a few Unity Store assets, each of which support the latest Unity, this may be true. But my project has many assets, and updating to newer versions of Unity is a great way to miss production deadlines in an endless quest for the latest greatest features.
     
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Can you explain what about these new improvements requires Unity 2018 to accomplish? I'm just curious because Invector has always been one of the last great assets to continue to support older versions and now that is about to end.
     
  39. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    I use the version: shooter Template v1.2.3
     
  40. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    The new features don't 'require' Unity 2018, but I think it's time to move on from 5.6.2, we fixed several warnings from an old API that soon it will not be supported anymore, we can take advantages of the Package Manager, improved Profiler, updated Collab, stable editor, improved Animator Controller window with zoom and option do copy parameters which is a lifesaver, and a lot more... It's not like we're going directly to the latest version available, we're going to a very stable LTS (Long term support) release which will have support for the next 2 years.

    Just like we always recommend using the latest version of our packages, Unity also recommends keeping the editor updated, of course this is not possible when you're developing a game and it's on an advanced stage, but if you started on an LTS version of the Editor it's more likely to still enjoy the latest features and bug fixes of a stable editor.
     
    Malbers likes this.
  41. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I fully support this decision! with my assets I upgraded to 2018.3.2.. to take advantage of the new Prefab system and all of the things you also said. ;) So yeah go for it!!
     
    SickaGames1 and Invector like this.
  42. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Are we getting our new release this week?!
     
  43. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I think it's possible yeah, just finishing up some editors and updating the documentation and it could be released within the end of the week in the vStore and next week on the AssetStore ;)
     
  44. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    Excuse me, I use the version: shooter Template v1.2.3
     
  45. daniozi117

    daniozi117

    Joined:
    Mar 4, 2016
    Posts:
    27
    I have issue with stealth animation. I am applying it on meleeCombat animator. All works fine but in the end the root motion doest not allow AI to step back and die animations are running two times.
     
  46. RadJack

    RadJack

    Joined:
    Nov 16, 2019
    Posts:
    1
    Really like this Third Person Asset. Although I don't have enough money for the melee template. I was wondering if you were gonna add a free demo version of the melee combat template?
     
  47. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Can you post a screenshot or the path of the folder in which the 'vFireProjectile' is?
     
  48. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Did you copy the "Stealth Kill" and "Stealth Kill Passive" substates from the example animator controller to your own animator controller and did the exit transitions as the example has? It should be working as expected if you set up correctly
     
  49. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Nope, we will not be creating lite versions of the shooter or melee templates, the only free lite version is the basic locomotion > https://assetstore.unity.com/packag...person-controller-basic-locomotion-free-82048
     
  50. Kazuya321

    Kazuya321

    Joined:
    Sep 18, 2019
    Posts:
    25
    the script is put in the script folder of my project rename pollu firepro.png