All pages
Powered by GitBook
1 of 1

Loading...

SCloth

Index

Properties Index

Property Name

Properties

BendingStiffness

float BendingStiffness get set

Bending stiffness of cloth.

CollisionMassScale

float CollisionMassScale get set

Increase the mass of colliding particles.

EnableContinuousCollision

bool EnableContinuousCollision get set

Enable continuous collision to improve collision stability.

Enabled

bool Enabled get set

Enable or disable components.

ExternalAcceleration

ExternalAcceleration get set

A constant external acceleration applied to the cloth.

Friction

float Friction get set

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

RandomAcceleration

RandomAcceleration get set

A constant external acceleration applied to the cloth.

StretchingStiffness

float StretchingStiffness get set

Stretching stiffness of the cloth.

UseGravity

bool UseGravity get set

Stretching stiffness of the cloth.

GameObject

GameObject get

Property Description

float BendingStiffness get set

float CollisionMassScale get set

bool EnableContinuousCollision get set

bool Enabled get set

SVector ExternalAcceleration get set

float Friction get set

SVector RandomAcceleration get set

float StretchingStiffness get set

bool UseGravity get set

SGameObject GameObject get

SVector
SVector
SGameObject
Space.Host.ExecutingObject.Cloth.BendingStiffness = 0.5
Space.Host.ExecutingObject.Cloth.CollisionMassScale = 0.5
Space.Host.ExecutingObject.Cloth.EnableContinuousCollision = true
Space.Host.ExecutingObject.Cloth.Enabled = false
--clicking this object will Enable/Disable it's Cloth component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.Cloth

OnClick = function()
component.Enabled =  not component.Enabled
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Space.Host.ExecutingObject.Cloth.ExternalAcceleration = Vector.New(2,4,5)
Space.Host.ExecutingObject.Cloth.Friction = 0.8
Space.Host.ExecutingObject.Cloth.RandomAcceleration = Vector.New(2,4,5)
Space.Host.ExecutingObject.Cloth.StretchingStiffness = 0.6
Space.Host.ExecutingObject.Cloth.UseGravity = true
theGameObject = Space.Host.ExecutingObject.Cloth.GameObject