APK - Doc - V1.7
  • Adventure Puzzle Kit v1.7: Introduction
  • ⭐Getting Started
    • Built-in Setup
    • URP Setup
    • HDRP Setup
  • Managers Explained
    • UI Manager
    • Disable Manager
    • Prompt Manager
  • 🏔️References
  • Setting Up Interactive Objects
  • URP Deferred Rendering?
  • Tag & Layer Reference
  • New FPSController
  • AKItem Explained
  • ⏭️Extending
    • Editor Scripts
    • System Inputs
    • Adding Audioclips
      • Audio Effect Volume
    • System Namespace
    • Adding a Trigger Event
    • Swapping Character Controllers
  • 🛡️System Breakdowns
    • Main Camera Components
    • AK Inventory Canvas
    • Keypad & Phone
    • Note & Letter
    • Door System
    • Themed Key
    • Generator
    • Gas Mask
    • Flashlight
    • Examine
    • Padlock
    • Chess
    • Lever
    • Valve
    • Fuse
    • Safe
  • ❓Support
    • FAQ
    • Examine Issues?
    • Post Processing Errors
    • Examine Text Missing?
    • Yellow Warnings?
    • Item Pickup Range
    • Animation Rotations
    • I can't see new fields / variables?
  • 🌀Development
    • Patch Notes - v1.7
    • Roadmap
  • 📧Contact Me
    • Contact Me
    • Request A Feature
    • My Other Assets
Powered by GitBook
On this page
  1. Extending

Swapping Character Controllers

PreviousAdding a Trigger EventNextMain Camera Components

Yes, you can - but you will need to setup the child objects in the same way as the one you see below or as the example in the demo scene:

Make sure your player controller has a parent object above it and the FlashlightSwing is a child of that parent, not of your controller

This video is about adding a new FPSController, you don't need to worry about the padlock section as it's been changed in V1.6!

How to disable movement?

The AK - DisableManager script has a reference to the player character on this example:

using UnityStandardAssets.Characters.FirstPerson;

[SerializeField] private FirstPersonController player;

public void DisablePlayerDefault(bool disable, bool isInteracting, bool isExamine)
{
    if (disable)
    {
        //Code
        if (isExamine)
        {
             blur.enabled = true;
        }

        if (isFirstPerson)
        {
            player.enabled = false;
        }

        if (isThirdPerson)
        {
            thirdPersonController.enabled = false;
            thirdPersonRotator.enabled = false;
         }
    }
    else
    {
        //Code
        if (isExamine)
        {
             blur.enabled = false;
        }

        if (isFirstPerson)
        {
            player.enabled = true;
        }

        if (isThirdPerson)
        {
            thirdPersonController.enabled = true;
            thirdPersonRotator.enabled = true;
        }
      }

You will want to edit the reference variable and the lines below to incorporate disabling your character movement and camera rotation:

//Reference your character controller here, unless your controller solution comes
//with a better solution
[SerializeField] private FirstPersonController player;
⏭️
This video is about adding a new FPSController, you don't need to worry about the padlock section as it's been changed in V1.6!