Free climb

funtastyk

New member
Hello friends, I have a problem when I use "FreeClimb" an error occurs :

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:395)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:794)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateUltimateLocomotion () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:724)
Opsive.UltimateCharacterController.Character.CharacterLocomotion.Move (System.Single horizontalMovement, System.Single forwardMovement, System.Single deltaYawRotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:477)
Opsive.UltimateCharacterController.Game.KinematicObjectManager+KinematicCharacter.Move (System.Boolean manualMove) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:236)
Opsive.UltimateCharacterController.Game.KinematicObjectManager.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:886)

But if I start to use the "free climb" ability and hold down the "W" (move forward), then the error does not appear.
Sorry for my english, i use translate.
 
I think the problem is that m_DetectedObject == null, but how to fix it? 1 null.png
 

Attachments

  • 2 null.png
    2 null.png
    17 KB · Views: 7
  • 3 null.png
    3 null.png
    66.9 KB · Views: 6
Can you tell me how to reproduce this error?
I have a project based on "Third person controller" and addon "agility". I also added the "climbing pack" addon and I get this error when I try to use the "free climb".


As you can see, the error appears when I start using the ability and try to move up vertically, everything works horizontally.
You can also see in the video 00:19 what if, at the beginning of using the "free climb" ability, HOLD THE BUTTON "W" (Move vertical) everything starts working
 
Does it work correctly if you don't add any of the Agility add-ons? If you can reproduce it within a small demo scene and send me that file that would be great.
 
Does it work correctly if you don't add any of the Agility add-ons? If you can reproduce it within a small demo scene and send me that file that would be great.
I use Input System and URP.
Please delete folder "Stylized Water For URP".
Action button is G.
 
If you are going to post on the forum please do not include paid assets. Anybody can read the forum and may not have a license to the same assets. If you want to send a complete project you can send it to support@opsive.com.

With that said, I'll take a look and let you know if I can't reproduce it.
 
Does it work correctly if you don't add any of the Agility add-ons?
The Agility addon does not affect this. I think there is a problem with TopDismount, if I disable this option from "AllovedMovements" everything works fine ... but the character does not climb the ledge, which is logical
 
Thanks - the issue occurs because the MoveTowards component wasn't added to the climbing object. I have a more comprehensive fix in the next update but for now you can fix the error by changing the following within DetectObjectAbilityBase.OnImmediateTransformChange:

From:

Code:
                m_DetectedObject = null;
to:
Code:
            if (m_ObjectDetection == ObjectDetectionMode.Trigger || m_ObjectDetection == 0) {
                m_DetectedObject = null;
            }
 
Thanks - the issue occurs because the MoveTowards component wasn't added to the climbing object. I have a more comprehensive fix in the next update but for now you can fix the error by changing the following within DetectObjectAbilityBase.OnImmediateTransformChange:

From:

Code:
                m_DetectedObject = null;
to:
Code:
            if (m_ObjectDetection == ObjectDetectionMode.Trigger || m_ObjectDetection == 0) {
                m_DetectedObject = null;
            }
Thank you very much Justin, fixed the "OnImmediateTransformChange" method and everything works fine. I am very glad that I chose your product, everything works great and the support is top notch.
 
Top