- Home /
Question by
Rob-Hafey · Aug 05, 2015 at 03:03 AM ·
gameobjectcharactercontroller
Upgrade U4 to U5 Problem (CharacterController.SimpleMove)
My game is using CharacterControllers and runs fine in U4. After the upgrade I am getting a Warning on my CharacterController script move method "CharacterController.Move called on inactive controller". Nothing has changed in the code other than the upgrade.
NOTE!! The actual call is CharacterController.SimpleMove :)
I have verified that the CharacterController is active (controller.gameObject.active=true) and all the gameObjects up to the root object are also active.
Any ideas? Everything else seems to have ported perfectly but this has me baffled. Any suggestions?
public Vector3 SimpleMove (Vector3 currentPosition, Vector3 direction) {
forwardPlanning = forwardPlanning < 0.01F ? 0.01F : forwardPlanning;
if (controller == null) {
controller = GetComponent<CharacterController>();
}
if (controller == null) {
Debug.LogError ("No CharacterController is attached to the GameObject");
return direction;
}
direction = ClampMove (currentPosition,direction);
// WARNING IS ON THE CALL BELOW
controller.SimpleMove (direction);
return direction;
}
Comment