Using a different Character Controller
In the DisableManager script, we reference the player controller and disable the FirstPersonController script so the player cannot rotate or move.
When we interact with the object we disable character movement and camera rotation. If youβre using a different controller please replace that reference with the way to disable your controllers movement and camera rotation!
My example scene has a variable called FIrstPersonController player = null;
This is reference the FirstPersonController script and we give it the name of player.
You can change FirstPersonController to the player controller you're using and how you would like to disable the camera movement and player movement.
In the snippet below, we can disable the player and camera movement by setting player.enabled = false because this will disable the FirstPersonController script. This controls both the player movement AND camera movement. This is where you would change those two statements accordingly!
If you have any issues at all, do send me an email! :)
Last updated