πŸ”Ž
Examine System V1 - Doc
  • Examine System - Introduction
  • ⭐GETTING STARTED
    • Quick Setup
    • Detailed Setup
    • GameObject Tag Reference
  • πŸ”ŽINSPECTION POINTS
    • Adding Inspection Points
    • Inspect Points - Custom Event
    • Inspect Points - Animations
  • HDRP Setup
    • HDRP Setup
  • URP Setup
    • URP Setup
    • Deferred Rendering Note
  • ❓Support
    • FAQ
    • Disabling Hints
    • Adding Audioclips
    • Where are inputs?
    • Text Not Appearing?
    • Items Not Appearing?
    • Emission Highlighting
    • Destroy Instanced Materials
    • Where are UI's located?
    • Where is the Examine Point?
    • Using a different Character Controller
  • πŸŒ€Development
    • Patch Notes - V1.7
    • Roadmap
  • πŸ“§CONTACT ME
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page

Was this helpful?

  1. Support

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.

    public class ExamineDisableManager : MonoBehaviour
    {
        [SerializeField] private ExamineInteractor interactorScript = null;
        [SerializeField] private FirstPersonController player = null; //CHANGE THIS
        [SerializeField] private BlurOptimized blur = null;
    }

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! :)

        public void DisablePlayer(bool disable)
        {
            if (disable)
            {
                player.enabled = false; //CHANGE THIS
                interactorScript.enabled = false;

                blur.enabled = true;
                ExamineUIManager.instance.EnableCrosshair(false);
            }
            else
            {
                player.enabled = true; //CHANGE THIS
                interactorScript.enabled = true;

                blur.enabled = false;
                ExamineUIManager.instance.EnableCrosshair(true);
            }
PreviousWhere is the Examine Point?NextPatch Notes - V1.7

Last updated 1 year ago

Was this helpful?

❓