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

Cloth Gravity#

Physics / Cloth Gravity

  • Can Read

  • Can Write

Description#

The global gravity of the cloth simulation

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Cloth Gravity")]
    [Category("Physics/Cloth Gravity")]
    [Description("The global gravity of the cloth simulation")]
    
    [Image(typeof(IconShirt), ColorTheme.Type.Lime, typeof(BadgePhysics))]
    
    [Serializable]
    public class TypeVector3PhysicsClothGravity : TypeVector3
    {
        public override Vector3 GetPreview(GameObject source) => Physics.clothGravity;

        public override Vector3 Get(Args args)
        {
            return Physics.clothGravity;
        }
        
        public override void Set(Vector3 value, Args args)
        {
            Physics.clothGravity = value;
        }
        
        public override string ToString()
        {
            return "Cloth Gravity";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.