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

Random Rotation#

Random / Random Rotation

  • Can Read

  • Cannot Write

Description#

A random rotation pointing at any direction with any roll

Code#

using System;
using UnityEngine;
using VisualScript.Icons;
using Random = UnityEngine.Random;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Random Rotation")]
    [Category("Random/Rotation")]

    [Description("A random rotation pointing at any direction with any roll")]
    [Image(typeof(IconDice), ColorTheme.Type.Yellow, typeof(BadgeRotation))]

    [Keywords("Dice", "Quaternion", "Any", "Orientation", "Shuffle", "Spin")]

    [Serializable]
    public class TypeQuaternionRandom : TypeQuaternion
    {
        public override Quaternion Get(Args args)
        {
            return Random.rotation;
        }

        public override string ToString()
        {
            return "Random Rotation";
        }

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