- Home /
Deactivate/Activate FPS Movement
I am using the stock Unity FPS Controller. I have created a new movement script (Climb.cs) and attached it to the FPS Controller. Here's what I want to do. When the player enters a trigger collider, the script on the collider deactivates the movement scripts on the FPS (minus MouseLook) and sets the variable "canControl" in Climb.cs to true, activating that movement setup.
Soemthing like
void OnTriggerEnter()
{
FPS Controls = deactivated;
Climb.cs variable "canControl" = true;
}
void OnTriggerExit()
{
FPS Controls = activated;
Climb.cs variable "canControl" = false;
}
I hope this makes sense. If not, please let me know where I need to clarify.
.enabled = false;
is probable what I'm looking for. So, yes, like that. Now I just have to figure out which scripts to disable...
Your answer
Follow this Question
Related Questions
Making a bubble level (not a game but work tool) 1 Answer
Problem with OnTriggerExit 1 Answer
Multiple Cars not working 1 Answer
Unity3D: Entering a trigger disables a few bools for no reason 2 Answers
Strange OnTriggerEnter/Exit() Behavior 0 Answers