- Home /
How to disable Character Motor temporarily
Every time I try disabling my Character Motor script it keeps reenabling itself. I looked over all of my scripts and none of them turn it back on so I'm assuming the script itself turns itself back on but I don't see anything in the script that would do that. Anyone know of a way to turn off the Character Motor script? It messes with my pause menu.
bump
is this a universal thing or am I the only one with a character motor that can't turn off?
How are you "turning it off"?
And please refrain from bumping questions that are less than a month or so old :)
@Benproductions1 sorry about that, unfamiliar with the rules. I'm turning it off by using player.GetComponent(Character$$anonymous$$otor).enabled = false; and through pausing the game in unity and going to the inspector and disabling it
@Josh707 Interesting idea, i'll certainly try that when I get home (at work right now)
@Josh707 you were right, my player script had a dependency on the character motor causing it to always be on. If you want to post it as an answer i'll mark it as correct
Answer by Josh707 · Dec 28, 2013 at 07:00 AM
The character motor is a script right? Check any scripts that might have RequireComponent(typeof(CharacterMotor)), I think Unity might not let you disable one if another script relies on it