UCC Locomotion critical error

Szymon Z.

Member
Hi,
We have big problem with UCC locomotion v3.
We have interaction with the world, when player can disable object below the player (player is standing on this object). But if that will happen, the UCC is throwing error and whole input is locked.

Error:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Character.CharacterLocomotion.UpdatePosition () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:773)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdatePosition () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:688)
Opsive.UltimateCharacterController.Character.CharacterLocomotion.UpdateCharacter () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:499)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateCharacter () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:565)
Opsive.UltimateCharacterController.Character.CharacterLocomotion.Move (System.Single horizontalMovement, System.Single forwardMovement, System.Single deltaYawRotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:479)
Opsive.UltimateCharacterController.SimulationManager+CharacterComponents.Move () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:55)
Opsive.UltimateCharacterController.SimulationManager.MoveCharacters () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:259)
Opsive.UltimateCharacterController.SimulationManager.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:228)


On screen i attached fragment on code.
Once error appears, the collider is null.
1677758614651.png
 
Next to the grounded check if you also check for a null collider it'll fix that error. I'll do the same.
 
Top