Issues with the new climbing pack

Drex

New member
I'm getting an issue with the free climb. What I've done so far:

I set up the character manager for 3rd person only

I then added the climbing pack

I then changed the state of the free climb ability from FreeClimb to Airborne by typing it in to the State field as I couldn't find any other way to do it

I then added the states for the Animator Monitor and Character IK components

Finally I made a layer for climbable objects and assigned it to a default Unity cube

When I attempt to climb the cube I get an error: NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.AddOns.Climbing.FreeClimb.Update () (at Assets/Opsive/UltimateCharacterController/Add-Ons/Climbing/Scripts/FreeClimb.cs:377)

Also, the character freezes for a second, kind of sticks to the wall for a moment then pops off it.

I'm not sure what I'm doing wrong. Let me know if you need any other info.

Thanks
 
What does line 377 point to for you and can you tell what is null? It looks like all of the variables are value objects so they can't be null:

Code:
                    if (!Physics.Raycast(rayPosition, raycastNormal, out m_RaycastHit, (m_CastDistance + Mathf.Abs(m_CastOffset.z)) * 2, 1 << m_DetectedObject.layer, QueryTriggerInteraction.Ignore)) {
 
What does line 377 point to for you and can you tell what is null? It looks like all of the variables are value objects so they can't be null:

Code:
                    if (!Physics.Raycast(rayPosition, raycastNormal, out m_RaycastHit, (m_CastDistance + Mathf.Abs(m_CastOffset.z)) * 2, 1 << m_DetectedObject.layer, QueryTriggerInteraction.Ignore)) {
Ok, sorry, I figured out why the error was appearing. Apparently the climb addon doesn't play nice with the UModeler tool when the model still has UModeler component attached to it. I noticed I only got the error when I tried to climb the custom terrain next to the cube and not the cube itself. My mistake there. I have that figured out by making the terrain just normal geometry. So we can ignore the part about the error.

I am still not climbing anything though. I get no errors, but the model just freezes for a second, clings to the wall for a second, then comes off the wall. He never climbs up, just sits on the wall for a second, then falls off.

Here is a video of how I have the character set up as well as what happens when I attempt to climb an object. Hope this helps:

 
I haven't used UModeler so I'm not sure why it would affect it but I'm glad that you are making progress.

It looks like the free climb ability is stopping likely because it doesn't think that it's on a free climb object anymore. As a test if you copy the free climbing object from the demo scene and bring it into your scene does it work? This will indicate if it's a setting on the character or something to do with the object.
 
I haven't used UModeler so I'm not sure why it would affect it but I'm glad that you are making progress.

It looks like the free climb ability is stopping likely because it doesn't think that it's on a free climb object anymore. As a test if you copy the free climbing object from the demo scene and bring it into your scene does it work? This will indicate if it's a setting on the character or something to do with the object.
Ok, more weirdness! So I imported in the entire free climb object in to my scene. With my Nolan, he is unable to climb the walls. The exact same issue happens as before. Sticks to the wall for a second, then falls off. I then imported both the free climb object and the Nolan used in the free climb demo. This Nolan climbs the walls of the demo just fine. So I took him outside the demo object walls and in to my terrain and he clips through any object that has the "Climbable" layer that I set up. It took a while to figure out why he was clipping but that's why.

Anyway, once I set the cube back to the default layer, he doesn't clip through it anymore, but he doesn't climb it. He doesn't even attempt to climb it, like it's considered a wall he's not allowed to climb. I assume that has something to do with something else you put on the walls in the demo level? In the documentation it said I could either use a layer or the Object Identifier. I wanted to go with layers because it just seemed like an easy way to assign what is and isn't climbable. That doesn't seem to be working for me and the Nolan from the demo seems to not like that set up at all.

I think this might be part of the problem though. I simply set up a layer called "Climbable" and assigned it to the cube I wanted to climb. The cube has nothing else on it except what it comes with by default.
 
When you set the layers did you also change the detected layer within the Free Climb ability?
 
When you set the layers did you also change the detected layer within the Free Climb ability?
Yes, it is set as the detected layer in the free climb ability.

Edit: After looking over how the demo Nolan is set up vs mine, I found that the default Climb Offset was set to -0.25 or something like that. I changed it to 0.45 like the demo Nolan and climbing works finally. It's still a bit buggy. He can sometimes get stuck in the climbing position but unable to move until I jump off and try again. Also sometimes his lower half will move without his upper half lol. So there are still a few problems that hopefully moving some numbers around will help with if you have any advice for that.
 
Last edited:
Glad you are making progress. If you're unable to move it sounds like one of the offsets is set too close or far. Have you enabled debugging on that ability to be able to see where the raycasts are going?
 
Glad you are making progress. If you're unable to move it sounds like one of the offsets is set too close or far. Have you enabled debugging on that ability to be able to see where the raycasts are going?
I'm getting there slowly! I did not have the debugging on, so I went ahead and turned that on. Which offset should I adjust to prevent the character from clipping through the floor when I try to climb down the wall from on top of it? Right now I can press the climb button pretty far from an edge and he will clip through the floor trying to get in to the climb down position, then he bugs out and gets stuck in a climbing pose. I'm assuming it's because one of the offsets is set too high and he's not close enough to the edge when it initiates?
 
I'm sorry but without having any documentation or videos on how to set up the Climb pack addon is very frustrating. I have used the manager to set up the abilities and animations to my custom character. But I'm having all kinds of issues (issues ranging from the character getting stuck inside things, character clipping through the terrain and falling, etc..) with the Climb pack. I'm not really happy with the status of the product. I have tried to match up my character to the Nolan in the demo scene but that doesn't seem to help. I'm like shooting in the dark.
 
Yeah, a video going over everything would be super helpful. So far I have the free climb working decently in my scene. It has taken a lot of trial and error lol. I had to change a few setting that weren't mentioned in the brief documentation explaining how to set it up. I also had to make sure the character couldn't attempt to climb down from above by setting the angle threshold to 91. It seems to work good at 91 as it still seems to be able to go around 90 degree corners which is enough for my needs and it prevents him from trying to climb down when near an edge because that climb down is super buggy for me. So now I just run off edges and if I want him to grab the wall I just turn him around mid air and grab it. It's not the best solution, but until some of these issues get fixed I think it's good enough for now.

One thing I'm having issues with is the character isn't rotating toward the climbable surface and grabbing on to it like he does in the demo. He just freezes for a second, the connects to the wall. It's weird looking but it works otherwise.

Bugs I've gotten to happen in the demo:

If you climb on to a ladder and interrupt the animation to climb on to it with a jump, you will be stuck in the climb animation unable to move unless you jump, then you can move around in air but still stuck in the animation. The only way out of it is to grab the ladder.

Short climb, if you spam the climb button, it will interrupt the animation and you will just twitch out until you stop spamming the button. Also if you face sideways to the short climb wall and press the climb button, it will attempt to climb thin air, then you will fall down after.

Free climb, if you fall off the wall, then turn around and try to grab it mid air, you will start walking backward, teleport to the top, then fall through the map and the demo is broken until you restart it. Which is weird because I do that exact same thing with my character in my scene and it works fine.
 
We ran a prerelease phase and I was able to fix all of the reported issues then, but now that it's released on the Asset Store there's a wider audience. With that said, I'm definitely committed to getting everything fixed in the next update.

Why is that Short Climb can climb into a wall? And why is there no Object Detection and Detect Layer for the Short Climb?
The object is marked as a climbable object and there is no collision detection since I didn't think of that use case. Thanks, it'll be fixed in the next update.

I'm sorry but without having any documentation or videos on how to set up the Climb pack addon is very frustrating. I have used the manager to set up the abilities and animations to my custom character. But I'm having all kinds of issues (issues ranging from the character getting stuck inside things, character clipping through the terrain and falling, etc..) with the Climb pack. I'm not really happy with the status of the product. I have tried to match up my character to the Nolan in the demo scene but that doesn't seem to help. I'm like shooting in the dark.
Have you seen the documentation on this page? https://opsive.com/support/documentation/character-controller-climbing-pack/getting-started/

I had to change a few setting that weren't mentioned in the brief documentation explaining how to set it up
When I created the setup guide I went through it to be sure there weren't any extra steps, but the person designing the system is always the worst person at writing the documentation since they are so familiar with it so I could have forgotten something. Do you know what setting you changed?

angle threshold to 91.
The angle threshold on the Detect Object Ability Base ability?

One thing I'm having issues with is the character isn't rotating toward the climbable surface and grabbing on to it like he does in the demo. He just freezes for a second, the connects to the wall. It's weird looking but it works otherwise.
If you can send me a repro scene I can take a look at it closer.

If you climb on to a ladder and interrupt the animation to climb on to it with a jump, you will be stuck in the climb animation unable to move unless you jump, then you can move around in air but still stuck in the animation. The only way out of it is to grab the ladder.

Short climb, if you spam the climb button, it will interrupt the animation and you will just twitch out until you stop spamming the button. Also if you face sideways to the short climb wall and press the climb button, it will attempt to climb thin air, then you will fall down after.

Free climb, if you fall off the wall, then turn around and try to grab it mid air, you will start walking backward, teleport to the top, then fall through the map and the demo is broken until you restart it. Which is weird because I do that exact same thing with my character in my scene and it works fine.
Thanks, I'll take a look at those and get back to you.
 
When I created the setup guide I went through it to be sure there weren't any extra steps, but the person designing the system is always the worst person at writing the documentation since they are so familiar with it so I could have forgotten something. Do you know what setting you changed?
The major thing I changed was the Climb Offset in the free climb. It was by default set to -0.15 or something like that. That's how it was set when I added the addon to the character. I had to set that to 0.45 like the demo Nolan in order for the climbing to even work at all. At first he would just kinda stick to the wall for a second and then pop off.

I also changed a few other settings that the demo Nolan had different from the default Nolan when you add the addon. The Cast Offset I'm pretty sure was one of them. I don't know what it actually did, but in an attempt to fix my climbing issues, I basically just made everything the same as the demo Nolan with a few differences, mostly that I want him to automatically climb

I then changed the Angle Threshold which was inside the Free Climb > Object Detection > Angle Threshold. I did this purely so I wouldn't automatically climb down from above because the character would attempt to climb down from way too far from the edge, which would have him clip through the ground and all through the object. I'd rather he automatically climbed down, but this is my work around for now. I'm hoping there's a better way as I'm sure that's not the intended use for the Angle Threshold.

Last thing I can think of that I did different was that I changed his Controller in Animator > Controller from the default, which I think was Demo in to ClimbingDemo because that's what the demo Nolan had. It didn't actually seem to do much of anything for me though. I noticed no difference between the two.

I have sent you a DM with a link to a repro scene I created. At least I think I did it right, first time making one lol.

Thanks for all the help and hard work you're putting in to this. I really like the free climb system and can't wait to see it all working perfect.
 
Thanks for that recap. I'll take a closer look at those settings compared to the default.

One thing I'm having issues with is the character isn't rotating toward the climbable surface and grabbing on to it like he does in the demo. He just freezes for a second, the connects to the wall. It's weird looking but it works otherwise.
Thanks for sending your repro scene. The problem is that the character is rotating really slowly when Move Towards is active so that's making it look like the character doesn't rotate until there is a timeout and the character snaps to the start location. You can fix this by setting the State parameter of the Move Towards ability to MoveTowards:

1626613896699.png

And then add that state to the Ultimate Character Locomotion component:

1626613933464.png

For more details on how this system works take a look at the state system. I will also have the character editor automatically add this state since it's insanely useful.

If you climb on to a ladder and interrupt the animation to climb on to it with a jump, you will be stuck in the climb animation unable to move unless you jump, then you can move around in air but still stuck in the animation. The only way out of it is to grab the ladder.

Short climb, if you spam the climb button, it will interrupt the animation and you will just twitch out until you stop spamming the button. Also if you face sideways to the short climb wall and press the climb button, it will attempt to climb thin air, then you will fall down after.
I have these fixed. I'll do an update this week so it won't take long.

Free climb, if you fall off the wall, then turn around and try to grab it mid air, you will start walking backward, teleport to the top, then fall through the map and the demo is broken until you restart it. Which is weird because I do that exact same thing with my character in my scene and it works fine.
Can you record a video of this happening within the demo scene? I haven't been able to reproduce it.
 
The MoveTowards worked for me. He now turns toward the climbable surface naturally. It looks much better now, thanks!

Something else unrelated to the climb mechanic but I thought I'd throw it in here. Is there any way currently for the character to slide down a slope that's higher than the slope limit? Right now if I get myself on a slope and I'm not climbing, I just stick to the wall rather than falling down even when it's a like 80 degree angle. Anything I can do to fix that?

For the most part I think the climbing is working pretty much how I would like it to. I'm trying out Manual mode because it feels a lot better than Automatic which just keeps trying to climb walls if you're close to them.

One thing I noticed with some testing that isn't a bug, but I would like to see is that the character doesn't rotate vertically with the terrain. It would be really nice for sloped surfaces that I want him to climb. Right now the character will just float if the slope is too much. If a rotation could be added to keep him aligned with more sloped surfaces, that would be awesome.

1626635469613.png
 
Last edited:
The MoveTowards worked for me. He now turns toward the climbable surface naturally. It looks much better now, thanks!
Awesome.

Here you go! Just walk off, turn around while falling, press F against the wall, and it will do the rest.
Thank you - I made some changes to fix something else and it looks like I ended up fixing this as well. I'll send you the latest version of climbing to make sure everything works for you.

Something else unrelated to the climb mechanic but I thought I'd throw it in here. Is there any way currently for the character to slide down a slope that's higher than the slope limit? Right now if I get myself on a slope and I'm not climbing, I just stick to the wall rather than falling down even when it's a like 80 degree angle. Anything I can do to fix that?
Can you create a new thread for this? If you have the Slide ability added the character should slide down steep slopes.

One thing I noticed with some testing that isn't a bug, but I would like to see is that the character doesn't rotate vertically with the terrain. It would be really nice for sloped surfaces that I want him to climb. Right now the character will just float if the slope is too much. If a rotation could be added to keep him aligned with more sloped surfaces, that would be awesome.
The character will adjust their yaw to match the terrain, but you're right in that it doesn't adjust the pitch. Right now I want to make sure everything is working with the base set of features before adding new features, but this is a good feature to add.
 
Thank you - I made some changes to fix something else and it looks like I ended up fixing this as well. I'll send you the latest version of climbing to make sure everything works for you.
I will check that out and get back to you soon.

Can you create a new thread for this? If you have the Slide ability added the character should slide down steep slopes.
I simply didn't have the Slide ability on the character. It works fine now. Thanks!
The character will adjust their yaw to match the terrain, but you're right in that it doesn't adjust the pitch. Right now I want to make sure everything is working with the base set of features before adding new features, but this is a good feature to add.
A solid plan. I do hope it gets added eventually but it definitely makes sense to work on what you have now to make it sure it all works good.
 
Tried out the new update. It's working a lot better. All the bugs I mentioned seem to be squashed. One bug I did manage to get, and it's kind of hard to pull off, is to fall off a short climb wall, turn around, and attempt to climb it with F before touching the ground. The character will get stuck in the wall and be unable to move unless you change his position with the arrows at the top.

Here's a video:
 
Oh, I spoke too soon. The ladder climb stuck animation glitch is much harder to pull off now, but it still seems to be possible. I'm not 100% sure how to pull it off exactly. It doesn't happen every time, but it seems to be when I press both jump and F at the same time while I'm on a ladder. Seems a tad more consistent if you spam them at the same time, but it still only happens once every 10 attempts or so.

Video:
 
Top