♟️
Chess Puzzle System - Doc
  • Chess Puzzle Sys - Introduction
  • ⭐Getting Started
    • Quick Start
    • Detailed Setup
  • ❓Support
    • FAQ
    • Power Up Event
    • Adding Audioclips
    • System Namespace
    • Adding More Fuses / Boxes
    • Using Different Character Controller
    • Where are inputs located?
    • Root GameObject warning?
    • Fuse Spawn Offset / Rotation
  • 🌀Development
    • Patch Notes - V1.4
    • Roadmap
  • 📧Contacts
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page
  1. Support

Using Different Character Controller

PreviousAdding More Fuses / BoxesNextWhere are inputs located?

Last updated 2 years ago

  • You can see that we create a reference to your controller at the top of the “CPDisableManager” script.

    • NOTE: You want to disable input and mouse look when you disable the player!

    • Change the "player" reference to how you would disable your own controller

Similar to how I've done so below:

    public class CPDisableManager : MonoBehaviour
    {
        /*Change the reference below here, to your own player script*/
        [SerializeField] private FirstPersonController player = null;
        [SerializeField] private ChessSystemInteractor raycastManager = null;

        public void DisablePlayer(bool disable)
        {
            if (disable)
            {
                raycastManager.enabled = false;
                CPUIManager.instance.ShowCrosshair(false);
                /*Change the reference below here, to your own player script*/
                player.enabled = false;
            }
            else
            {
                raycastManager.enabled = true;      
                CPUIManager.instance.ShowCrosshair(true);
                /*Change the reference below here, to your own player script*/
                player.enabled = true;
            }
        }
    }
❓