using System.Collections; using System.Collections.Generic; using UnityEngine; public class ToMainPosition : PermanentTriggerBase { protected override void OnMDown() { base.OnMDown(); LiveSceneManager.Instance.firstPersonController.GetComponent().enabled = false; LiveSceneManager.Instance.firstPersonController.GetComponent().useGravity = false; LiveSceneManager.Instance.firstPersonController.transform.SetParent(transform); LiveSceneManager.Instance.firstPersonController.transform.localPosition = Vector3.zero; LiveSceneManager.Instance.firstPersonController.transform.localRotation = Quaternion.identity; LiveSceneManager.Instance.firstPersonController.playerCanMove = false; StepManager.Instance.FinishStep(triggerName); } // Start is called before the first frame update void Start() { } }