Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

CLIMBING SYSTEM - [Official Thread]

Discussion in 'Assets and Asset Store' started by diasrodrigo, Feb 26, 2018.

  1. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28
    Character stuck here forever with LookSide Animation.
     

    Attached Files:

  2. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28
    upload_2022-1-2_18-23-10.png
    can be solved by this.(Test Bool for just debug case)
     
    ml785 likes this.
  3. PiedraViviente

    PiedraViviente

    Joined:
    Sep 26, 2021
    Posts:
    9
    Rodrigo,

    I bought this asset recently and I am really impressed with what you’ve created. Good job!

    I am trying to add life to my scene by creating AI-type characters that climb in a climbing gym, how would I go about doing this using the climbing system?

    To clarify, I don’t need the main character to interact with them, all I need them to do is climb up a wall with the ‘Wall Climb’ layer applied and drop, then climb again in an endless loop. I don’t need them to jump to ledges or holds. To make it interesting they would climb to random heights and then drop, wait a random time period and then start climbing again.

    Any support you could provide with this would be greatly appreciated.

    Thanks and keep up the good work!
     
    diasrodrigo likes this.
  4. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Hello!
    To make it, you can call ThirdPersonsystem.SetControllerAsAI() to stop receiving input. Then you can create a new script that handles this logic to climb and stop, and climb again. If you don't want to use other abilities, you can simply remove them from the character.

    You can direct change some inputs in the UnityInputManager script to get the action you want. For example: UnityInputManager.dropButton.SetbuttonState(true,false,true) - (wasPressed, wasReleased, isPressing)

    In the climbing ability, it will know that drop is set to true, and will drop the character.

    This is one example. You can do the same with other buttons and actions
     
    PiedraViviente likes this.
  5. PiedraViviente

    PiedraViviente

    Joined:
    Sep 26, 2021
    Posts:
    9
    [Edit]

    Rodrigo,

    I was able to get an AI climb feature implemented in the climbing demo scene, but when I create a new scene and follow your instructions to set up the TPS and climbing character the AI climb feature doesn’t quite work as expected. The character won’t jump to start the Wall Climb animation. However, when I press space bar, the character will jump and the AI climb coroutine will proceed and work as expected until he drops and it’s time to jump again. Do you know why the jump segment of my code is not registering in the new scene I created? What is different in the demo scene that I am missing in the new scene?

    Here’s how I modified UnityInputManager:
    Code (CSharp):
    1.        
    2.         private void Start()
    3.         {
    4.             StartCoroutine(AutoClimb());
    5.         }
    6.  
    7.         //Added Bools for autoclimbing
    8.         float AutoClimbSpeed = 1f;
    9.         private bool AutoClimbOn;
    10.         private bool JumpCoroutine = false;
    11.         private bool ClimbCoroutine = false;
    12.         private bool StopClimbCoroutine = false;
    13.         private bool DropCoroutine = false;
    14.  
    15.         IEnumerator AutoClimb()
    16.         {
    17.             AutoClimbOn = true;
    18.             Debug.Log("AutoClimb Started");
    19.  
    20.             yield return new WaitForSeconds(Random.Range(1.0f, 6.0f));
    21.  
    22.             JumpCoroutine = true;
    23.             yield return new WaitForSeconds(2f);
    24.  
    25.             JumpCoroutine = false;
    26.             yield return new WaitForSeconds(1f);
    27.  
    28.             ClimbCoroutine = true;
    29.             yield return new WaitForSeconds(Random.Range(2.0f, 5.0f));
    30.  
    31.             ClimbCoroutine = false;
    32.             StopClimbCoroutine = true;
    33.             yield return new WaitForSeconds(0.25f);
    34.  
    35.             StopClimbCoroutine = false;
    36.             yield return new WaitForSeconds(1f);
    37.  
    38.             DropCoroutine = true;
    39.             yield return new WaitForSeconds(0.5f);
    40.  
    41.             DropCoroutine = false;
    42.  
    43.             AutoClimbOn = false;
    44.         }
    45.  
    46.         private void FixedUpdate()
    47.         {
    48.             if (!AutoClimbOn)        //Start AutoClimb again
    49.             {
    50.                 StartCoroutine(AutoClimb());
    51.             }
    52.             if (JumpCoroutine)
    53.             {
    54.                 jumpButton.SetButtonState(true, false, true);
    55.             }
    56.             if (ClimbCoroutine)
    57.             {
    58.                 m_Move.y = AutoClimbSpeed;
    59.             }
    60.             if (StopClimbCoroutine)
    61.             {
    62.                 m_Move.y = 0;
    63.             }
    64.             if (DropCoroutine)
    65.             {
    66.                 dropButton.SetButtonState(true, false, true);
    67.             }
    68.  
    69.  
    70.             /*      //COMMENTED OUT THIS SECTION
    71.             if (!manualUpdate)
    72.             {
    73.                 m_Move.x = Input.GetAxis("Horizontal");
    74.                 m_Move.y = Input.GetAxis("Vertical");
    75.  
    76.                 m_ScrollView.x = Input.GetAxis("Mouse X");
    77.                 m_ScrollView.y = Input.GetAxis("Mouse Y");
    78.             }
    79.             */
    80.  
    81.             // calculate camera relative direction to move:
    82.             Vector3 CamForward = Vector3.Scale(m_Camera.forward, new Vector3(1, 0, 1)).normalized;
    83.             m_RelativeInput = m_Move.y * CamForward + m_Move.x * m_Camera.right;
    84.  
    85.         }
    Please note that I tried just executing the SetButtonState(true,false,true) command for each button within the coroutine, but it didn’t work. The only way I have been able to get it working so far is by executing the command over a period of time in FixedUpdate()
     
    Last edited: Jan 19, 2022
  6. Daezalus

    Daezalus

    Joined:
    May 16, 2020
    Posts:
    9
    Hello Rodrigo,

    Firstly, great asset - best climbing system I've seen.

    I've successfully integrated your system with Invectors controller, but am having some difficulty trying to implement Rootmotion's PuppetMaster also. Upon landing on the ground, the character bounces and jumps again. Also, when climbing up from a ledge he does a little bounce as well - seems when grounded there's an extra collision somewhere.

    I've tested out and tried a few different things, including turning off and on the character collider on landing, and I've also checked for any other colliders that may be interfering, but I cannot seem to identify where the issue is. I've studied the scripts also, but cannot see where I'm going wrong. Is there anything you can suggest that I may be missing? Any help would be greatly appreciated.

    Thank you

     
  7. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Awesome! How did you integrate with Invector? Since both are controllers were you able to only use the Climbing system and leave controller to Invector?
     
  8. Daezalus

    Daezalus

    Joined:
    May 16, 2020
    Posts:
    9
    Wish I could take the credit for it - HobbyCoder did an integration over on the Invector boards. Basically, you use both, but just switch off the invector input while using climbing, and vice versa.

    https://invector.proboards.com/thread/4095/climbing-system-13-integration-wip
     
    SamRock likes this.
  9. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    110
    Hi,
    3 questions:

    1. When Climbing a Ledge, I'll try to jump from the ledge onto a nearby ladder and about 50% of the time the Character jumps past the ladder rather than onto it. What is a way to ensure the Character grabs the ladder 100% of the time?
    2- When my character does a stationary jump underneath a ledge, he doesn't grab the ledge. He is definitely tall enough to grab the ledge, but he doesn't attempt to grab it at all. On the other hand, if I hit W while jumping, he will grab the ledge. What might be preventing a ledge grab attempt from stationary jump?
    3. How can you make the Stationary Jump happen instantly, rather than with animation delay? Trying to figure out how/where to change the scripts but am newbie coder. Thanks as always.
     
    Last edited: Jan 17, 2022
  10. NovelabDev

    NovelabDev

    Joined:
    Aug 6, 2018
    Posts:
    1
    Hi ! Thank you for this asset.
    Here are some feedback / questions I have.

    1 : Layers
    The Layers are hard-coded by index so I replace all layer index ocurrences by a const variable. I added this class :
    public static class LayerManager
    {
    public const int layerRagdoll = 13;
    public const int layerGround = 14;
    public const int layerCharacter = 15;
    public const int layerStepUp = 16;
    public const int layerLowerClimb = 17;
    public const int layerClimb = 18;
    public const int layerDroppableLedge = 19;
    public const int layerLadder = 20;
    public const int layerVault = 21;
    public const int layerWallRun = 25;
    public const int layerWallClimb = 26;
    }

    2 : Asset Path
    The asset path is hard-coded provoquing some issues when the folder "Dias Games" is not under the "Assets/" root folder.

    3 : Camera
    I am making a VR game so I don't need the camera. It would be better if there was a quick and easy way to remove camera dependencies.

    4 : Climbing a slope
    When character is climbing a wall or a ladder, it only climbs up verticaly. I can not have a ladder at 45 angle from the ground. How do I change that so my character rotates with the ladder ?

    5 : Scaling character
    I am making a VR game where the player controls a small character so I need to scale down my character to (0.1, 0.1, 0.1) size. Which parameters do I need to change accordingly ?
    Is it possible to have a function to adjust the character scale with all the parameters that must change ?

    Thanks
     
  11. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Hello guys. It's been a while since I bring news here.
    I've been working ina new update for my assets, and I would like to share a new improvement I'm making for Climbing System. This video is from a game we are developing, but I'll bring climbing improvements to the asset:

     
  12. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Looks great! What improvements are you planning to add?
     
  13. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    110
    Amazing!!!
     
    diasrodrigo likes this.
  14. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Better camera control, decoupling some dependencies to make integrations easier for other costumers that use other controllers. I would like to give this new update in this semester, but I have to test so many things before doing it. I would like to also add dragging blocks.
     
    Tin-Aung-Khant and SamRock like this.
  15. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Some news! I got hanging situations for free flow climbing too:

     
    osss, SamRock, ml785 and 2 others like this.
  16. Daezalus

    Daezalus

    Joined:
    May 16, 2020
    Posts:
    9
    22/02 - Any update on this please? A reply would be greatly appreciated
     
  17. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Hello. I'm actually developing a new update for Climbing System. This update will change dependencies between abilities, and will be easier to integrate. Asset as it is doesn't integrate well with Invector and other controllers. I'm working on the new update.
     
  18. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Hello. I've finished an update for Third Person System and now I'm working to climbing update. But before climbing be released, I would like to share some new tutorials I made explaining how the new system is working. These tutorials will be used for Climbing System, because it will use the same core system.

    https://www.youtube.com/playlist?list=PLCiJFSvsogGSFgEs7iPninMuXr1RkAd_t

    If you want to feel how the new system is working, you can play a demo version I made: https://drive.google.com/file/d/1peZp5h1e1tlIniIoA5uG9G9Hhzm7IGb_/view

    Hope all of you like the new improvements. I tried to make system easier to integrate and create new abilities
     
    SamRock and ChickenHero like this.
  19. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28

    Ohhh you changed the core system.
     
    diasrodrigo likes this.
  20. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28
    Demo is working is fine.
    Could you make a discord channel?
    it will be really good to track issues.Thanks
     
    diasrodrigo likes this.
  21. Daezalus

    Daezalus

    Joined:
    May 16, 2020
    Posts:
    9
    Thank you kindly, I appreciate the reply and I'm very much looking forward to seeing your updates of the climbing system
     
    diasrodrigo likes this.
  22. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Tin-Aung-Khant likes this.
  23. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28
    upload_2022-2-27_16-4-7.png

    When I was testing in this.
    Sometimes,I got vibrating hand IK issues.
    When I record in video shaking part disappear,its strange.
     
    diasrodrigo likes this.
  24. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    110
    When there were multiple ledges near character, I found it a little difficult to choose exactly what ledge to climb to. Other than that the demo feels great! Movement feels very free!

    Would it be possible to enable Cursor make the Cursor position control where you jump to, based on where user points cursor?

    For example, currently if I want to jump to the Circled ledge, I cannot jump there. If I hit "D" with space, I jump to the one to its right. If I hit "S" with space I jumped backwards.
    But theoretically if Cursor were enabled, I could hover Cursor over this circled ledge and jump there.

     
    Last edited: Mar 2, 2022
    diasrodrigo likes this.
  25. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    It happens because the criteria to choose ledge is the fartest one in the best direction of input. The problem to use cursor is that if you want to play it with a gamepad, it wil not be possible. In this specifcally situation, there are too many ledge I put propositally. But when creating a game, you can adjust it in a way that this situations will not happen

    It happened to me too. I enabled Vsync and it stopped. But it should be stopped in the build. But I'm still tunning IK. sometimes it still get weird effect
     
    ml785 likes this.
  26. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    This is great! Look forward to the integration feature with other controller. Using your Climbing system is going to be the best thing :)
     
    diasrodrigo likes this.
  27. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
  28. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    110
    Very very awesome. All movement with vaults wall runs climbing etc feels perfect.
    Will we still be able to drop onto ledge like in these situations?


    Would it be possible to jump from ladder to a ledge like in this situation?

    Can't wait!!
     
  29. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    You can drop holding SHIFT. Character will walk and drop.

    About jumping from ladder to a ledge, I didn't make it yet. I need to think how to do without depending on climb ability.
     
    ml785 likes this.
  30. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28
    I would prefer without pressing "SHIFT".
    Coz I will make "SHIFT" as Run or Sprint.
    (I think it can be changed in code right? I changed in previous version before)

    I wish this version became more stable and less small issues
     
  31. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    There is an option to not use button to drop. And in locomotion you can change if you want to run pressing shift or walk. You can set this in Inspector and don't need to change code
     
    ml785 and Tin-Aung-Khant like this.
  32. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Hello.
    I'm in the proccess of making tutorials and promo stuffs, like videos and art. I hope to submit this update in this week.
     
    SamRock and ml785 like this.
  33. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
  34. hedgefield

    hedgefield

    Joined:
    Jan 1, 2014
    Posts:
    39
    This is great, thanks for the hard work Rodrigo! I tested it briefly, plays really well, seems much more stable than before, and easy to tweak settings in the different components. Really glad you added that walk/run toggle too! What would you say is the greatest benefit of choosing either the kinematic or the rigidbody character controller?
     
    SamRock likes this.
  35. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    110
    Thanks, I downloaded the update and it works excellent!
    Two things:
    -Is there a way to convert it to not use Input System? I am very unfamiliar with Input System
    -When I try to jump from this ledge onto the WallRun wall, it doesn't let me jump there. Instead, even though I hold "A" while jumping to move left, my character jumps right.

     
    Last edited: Mar 17, 2022
  36. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Both have its own advantages and disadvantages. Character Controller for example has better ground detection and slope settings, but you need to code physics. Rigidbody has physics internally applied, but can stick on ground, and you need to configure physics materials. For better understanding, I recommend this video that I watched. I think it's a great explanation:


    Somthing got wrong when I uploaded the package. I will update it. But to fix it fast, got to animator, Climb state machine, and check to use Mirror parameter for Hop Side:
    upload_2022-3-17_10-31-42.png
    It was not checked. My bad, sorry

    There is a way to convert it to old input system. You just change it in your player settings. Player Controller is already setup to use old input. Just remember to set input keys via setup project settings:

    upload_2022-3-17_10-33-18.png
     
    hedgefield and ml785 like this.
  37. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    110
    Perfect, thanks @diasrodrigo !
     
  38. Tin-Aung-Khant

    Tin-Aung-Khant

    Joined:
    May 14, 2017
    Posts:
    28
    can this update do Jump from Ladder to Ledge?
    or will implement later?
     
    diasrodrigo likes this.
  39. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Does this work with the third person character system 2022? That one has push and pull
     
    ml785 likes this.
  40. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Yes! Both work together. Climbing System already has TPS in it.
     
    ml785 likes this.
  41. Stupeflip

    Stupeflip

    Joined:
    Mar 20, 2016
    Posts:
    10
    Hello, since the new update I can't find this : upload_2022-3-26_10-13-1.png

    Is it normal ?
    If yes, how can you build a character now ?

    Thank you
     
    biscito and diasrodrigo like this.
  42. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Now you don't need to build character. You simply change the model. It's good if youw ant to use multiple models with the same prefab. Here is how to change character:
     
    ml785 likes this.
  43. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    79
    I played with the demo of ClimbSystem 4.0.
    If I remember correctly, in previous versions I was able to jump up from the Climb state.
    The new system assumes that the ledge is installed, so if there is no ledge directly above, the character will not be able to jump up.
    Will future updates allow climb jumps even if the ledge isn't wall-mounted as before?
     
  44. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    In the tutorial I show how to allow jumping without find another ledge:
     
    ml785 likes this.
  45. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    79
    I checked the tutorial video.
    By turning on the check of CanFreelyJump, I was able to do HopSide without other Ledges.
    However, Hop Up is not possible.
    Is it possible to Hop Up even if I can't find another Ledge?
     
    diasrodrigo likes this.
  46. diasrodrigo

    diasrodrigo

    Joined:
    Jul 4, 2017
    Posts:
    420
    Thank you for noticing it. I will check it out and fix it.
     
    ml785 and ChickenHero like this.
  47. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    Hi Is it possible to integrate with invector shooter asset? Means latest climbing system. If yes can u pls share integration steps video prefered :) Pls
     
    Ricardo_77 likes this.
  48. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    479
    Has anyone implemented any sort of melee or shooter options/modifications? I saw the Invector integration package but I was just wondering if either something had been built or how easy it might be to do?
     
    Ricardo_77 likes this.
  49. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    HI can you please share the link for it to try :)
     
  50. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    479
    I'm getting very frustrated with Invector so I may try and implement my own solution. Granted it will probably be just Melee and not very portable, i.e. manually parenting weapons to bones, hack scripts, etc. But I may give it a try.