Breakroom is now Sinewave Campus. Book a meeting

SCloth

客户端组件
在此类中BendingStiffness
  1. 属性
  2. BendingStiffness
  3. CollisionMassScale
  4. EnableContinuousCollision
  5. Enabled
  6. ExternalAcceleration
  7. Friction
  8. RandomAcceleration
  9. StretchingStiffness
  10. UseGravity
  11. GameObject
成员 10
属性BendingStiffnessBending stiffness of cloth.
属性CollisionMassScaleIncrease the mass of colliding particles.
属性EnableContinuousCollisionEnable continuous collision to improve collision stability.
属性EnabledEnable or disable components.
属性ExternalAccelerationA constant external acceleration applied to the cloth.
属性FrictionReturn the friction of the cloth when colliding with the character.
属性RandomAccelerationA constant external acceleration applied to the cloth.
属性StretchingStiffnessStretching stiffness of the cloth.
属性UseGravityStretching stiffness of the cloth.
属性GameObject–

属性​

BendingStiffness​

float BendingStiffness {get; set; }

Bending stiffness of cloth.

示例

Lua
Space.Host.ExecutingObject.Cloth.BendingStiffness = 0.5

CollisionMassScale​

float CollisionMassScale {get; set; }

Increase the mass of colliding particles.

示例

Lua
Space.Host.ExecutingObject.Cloth.CollisionMassScale = 0.5

EnableContinuousCollision​

bool EnableContinuousCollision {get; set; }

Enable continuous collision to improve collision stability.

示例

Lua
Space.Host.ExecutingObject.Cloth.EnableContinuousCollision = true

Enabled​

bool Enabled {get; set; }

Enable or disable components.

示例

Lua
Space.Host.ExecutingObject.Cloth.Enabled = false
Lua
--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)

ExternalAcceleration​

SVector ExternalAcceleration {get; set; }

A constant external acceleration applied to the cloth.

示例

Lua
Space.Host.ExecutingObject.Cloth.ExternalAcceleration = Vector.New(2,4,5)

Friction​

float Friction {get; set; }

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

示例

Lua
Space.Host.ExecutingObject.Cloth.Friction = 0.8

RandomAcceleration​

SVector RandomAcceleration {get; set; }

A constant external acceleration applied to the cloth.

示例

Lua
Space.Host.ExecutingObject.Cloth.RandomAcceleration = Vector.New(2,4,5)

StretchingStiffness​

float StretchingStiffness {get; set; }

Stretching stiffness of the cloth.

示例

Lua
Space.Host.ExecutingObject.Cloth.StretchingStiffness = 0.6

UseGravity​

bool UseGravity {get; set; }

Stretching stiffness of the cloth.

示例

Lua
Space.Host.ExecutingObject.Cloth.UseGravity = true

GameObject只读​

SGameObject GameObject {get; }

示例

Lua
theGameObject = Space.Host.ExecutingObject.Cloth.GameObject