public static void UpdateArrow(this RadialPuppetMenu radialPuppet, float angleOriginal, float eulerAngle) { //MelonLogger.Msg($"Original: {angleOriginal}, Euler Angle:{eulerAngle}"); radialPuppet.GetArrow().transform.localPosition = new Vector3( 120 * Mathf.Cos(angleOriginal / Constants.RAD_TO_DEG), 120 * Mathf.Sin(angleOriginal / Constants.RAD_TO_DEG), radialPuppet.GetArrow().transform.localPosition.z); radialPuppet.GetArrow().transform.localEulerAngles = new Vector3( radialPuppet.GetArrow().transform.localEulerAngles.x, radialPuppet.GetArrow().transform.localEulerAngles.y, 180 - eulerAngle); }
public static void UpdateArrow(this RadialPuppetMenu radialPuppet, double angleOriginal, double eulerAngle) { radialPuppet.GetArrow().transform.localPosition = new Vector3((float)(120 * Math.Cos(angleOriginal / Constants.radToDeg)), (float)(120 * Math.Sin(angleOriginal / Constants.radToDeg)), radialPuppet.GetArrow().transform.localPosition.z); radialPuppet.GetArrow().transform.localEulerAngles = new Vector3(radialPuppet.GetArrow().transform.localEulerAngles.x, radialPuppet.GetArrow().transform.localEulerAngles.y, (float)(180 - eulerAngle)); }