CharacterController.move called on inactive controller

Hi!

I’m going through this course, and it’s been great :slight_smile:

One issue I have is when the main player dies, once the ToggleRagdoll call is performed, I’m shown an error : CharacterController.move called on inactive controller. No such issue with the NPC though. I’ve rewatched repeatedly the videos, but can’t find why that could be. Am I missing something?

J.-

Are you moving the character in the PlayerDeathState()? Once the player is dead, the physics system should be acting on the ragdoll and the controller can stay wherever it is.

Perhaps a previous state isn’t unsubscribing to an InputReader event in it’s Exit?

Thanks for writing back! Turns out, I had placed the OnTakeDamage invocation after the OnDie invocation in the Health script, so that cause the precedence issue… All fixed… thanks :slight_smile:

J.-

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms