I am trying to use locomotion system with my character. I am getting some errors. I think its about leg controller.
Error when I press Locomotion Initialisation:
NullReferenceException
LegController.GetTransformChain (UnityEngine.Transform upper, UnityEngine.Transform lower) (at Assets\Locomotion System\LegController.cs:272)
LegController.Init () (at Assets\Locomotion System\LegController.cs:145)
LocomotionEditorClass.DoToggle () (at Assets\Locomotion System\Editor\LocomotionEditorClass.cs:100)
When I double-click on the error it takes me to this code:
// Get the chain of transforms from one transform to a descendent one
public Transform[] GetTransformChain(Transform upper, Transform lower) {
Transform t = lower;
int chainLength = 1;
while (t != upper) {
t = t.parent;
chainLength++;
}
Transform[] chain = new Transform[chainLength];
t = lower;
for (int j=0; j<chainLength; j++) {
chain[chainLength-1-j] = t;
t = t.parent;
}
return chain;
}
Errors when I press play:
char_human: Locomotion System has not been initialized.
UnityEngine.Debug:LogError(Object, Object)
LegController:Awake() (at Assets\Locomotion System\LegController.cs:196)
char_human: Locomotion System has not been initialized.
UnityEngine.Debug:LogError(Object, Object)
LegAnimator:Start() (at Assets\Locomotion System\LegAnimator.cs:193)
I hope this makes it more clear.
My project: