Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Inverse#

Math / Inverse

  • Can Read

  • Cannot Write

Description#

Returns the inverse of a rotation

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Inverse")]
    [Category("Math/Inverse")]
    
    [Description("Returns the inverse of a rotation")]
    [Image(typeof(IconQuaternion), ColorTheme.Type.Lime, typeof(BadgeArrowLeft))]
    
    [Serializable]
    public class TypeQuaternionMathInverse : TypeQuaternion
    {
        [SerializeField] private GetQuaternion m_Rotation = new GetQuaternion();

        public override Quaternion GetPreview(GameObject source) => Quaternion.Inverse(this.m_Rotation.GetPreview(source));

        public override Quaternion Get(Args args)
        {
            Quaternion rotation = this.m_Rotation.Get(args);
            return Quaternion.Inverse(rotation);
        }

        public override string ToString()
        {
            return $"Inverse {this.m_Rotation}";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.