wiki.sine.space | sinespace

Scripting/SCloth

From wiki.sine.space
Revision as of 06:32, 15 January 2021 by Edisonwu (Talk | contribs) (Created page with "=Properties= {{ScriptFunction|float|BendingStiffness|{get; set;}|Bending stiffness of cloth.|5= Scene = Space.Scene<br> Skeleton = Scene.PlayerAvatar.Skeleton<br> Clothing =...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Properties

BendingStiffness

float BendingStiffness {get; set;}

Bending stiffness of cloth.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")

Clothing.BendingStiffness = 0.5


CollisionMassScale

float CollisionMassScale {get; set;}

Increase the mass of colliding particles.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")

Clothing.CollisionMassScale =0.5


EnableContinuousCollision

bool EnableContinuousCollision {get; set;}

Enable continuous collision to improve collision stability.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")
Clothing.EnableContinuousCollision = true

Space.Log(Clothing. EnableContinuousCollision)


Enabled

bool Enabled {get; set;}

Enable or disable components.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")

Clothing.Enabled = false


ExternalAcceleration

SVector ExternalAcceleration {get; set;}

A constant external acceleration applied to the cloth.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")
Clothing.ExternalAcceleration = Vector.New(3,4,5)

Space.Log(“ExternalAccelerationValue here X:”..Clothing.ExternalAcceleration.X..”Y:”.. Clothing.ExternalAcceleration.Y..”Z:”.. Clothing.ExternalAcceleration.Z)


Friction

float Friction {get; set;}

Return the friction of the cloth when colliding with the character.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")

Clothing.Friction = 0.896


RandomAcceleration

SVector RandomAcceleration {get; set;}

A constant external acceleration applied to the cloth.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")
Clothing.ExternalAcceleration = Vector.New(3,4,5)

Space.Log(“Random AccelerationValue here X:”..Clothing.RandomAcceleration.X..”Y:”.. Clothing.RandomlAcceleration.Y..”Z:”.. Clothing.RandomAcceleration.Z)


StretchingStiffness

float StretchingStiffness {get; set;}

Stretching stiffness of the cloth.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")

Clothing.StretchingStiffness = 0.689


UseGravity

bool UseGravity {get; set;}

Stretching stiffness of the cloth.

Scene = Space.Scene

Skeleton = Scene.PlayerAvatar.Skeleton
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")

Clothing.UseGravity = false