using UnityEngine; using Invector.vCharacterController; // Required to get access to the controller public class RotationDebugger : MonoBehaviour { private vThirdPersonController cc; private GUIStyle style; void Start() { cc = GetComponent(); // Setup for on-screen display style = new GUIStyle(); style.fontSize = 18; style.fontStyle = FontStyle.Bold; style.normal.textColor = Color.white; } void OnGUI() { if (cc == null) return; // Create a semi-transparent background box GUI.Box(new Rect(10, 10, 350, 140), ""); // Display critical information on screen string debugText = "--- ROTATION DEBUG ---"; debugText += $"\nRotation: {transform.rotation.eulerAngles.ToString("F2")}"; debugText += $"\nIs Rolling: {(cc.isRolling ? "True" : "False")}"; debugText += $"\nLock Rotation: {(cc.lockRotation ? "True" : "False")}"; debugText += $"\nAnimator Root Motion: {(cc.animator.applyRootMotion ? "True" : "False")}"; style.richText = true; GUI.Label(new Rect(15, 15, 340, 130), debugText, style); } }