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;
}
}