wiki.sine.space | sinespace

Difference between revisions of "Scripting/SCloth"

From wiki.sine.space
Jump to: navigation, search
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/scloth")
 
Line 1: Line 1:
=Properties=
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/scloth
 
+
{{ScriptFunction|float|BendingStiffness|{get; set;}|Bending stiffness of cloth.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.BendingStiffness = 0.5
+
}}
+
 
+
{{ScriptFunction|float|CollisionMassScale|{get; set;}|Increase the mass of colliding particles.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.CollisionMassScale =0.5
+
}}
+
 
+
{{ScriptFunction|bool|EnableContinuousCollision|{get; set;}|Enable continuous collision to improve collision stability.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.EnableContinuousCollision = true<br>
+
Space.Log(Clothing. EnableContinuousCollision)
+
}}
+
 
+
{{ScriptFunction|bool|Enabled|{get; set;}|Enable or disable components.|5=
+
Space.Host.ExecutingObject.Cloth.Enabled = false|6=<pre>--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)</pre>
+
}}
+
 
+
{{ScriptFunction|SVector|ExternalAcceleration|{get; set;}|A constant external acceleration applied to the cloth.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.ExternalAcceleration = Vector.New(3,4,5)<br>
+
Space.Log(“ExternalAccelerationValue here X:”..Clothing.ExternalAcceleration.X..”Y:”.. Clothing.ExternalAcceleration.Y..”Z:”.. Clothing.ExternalAcceleration.Z)
+
}}
+
 
+
{{ScriptFunction|float|Friction|{get; set;}|Return the friction of the cloth when colliding with the character.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.Friction = 0.896
+
}}
+
 
+
{{ScriptFunction|SVector|RandomAcceleration|{get; set;}|A constant external acceleration applied to the cloth.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.ExternalAcceleration = Vector.New(3,4,5)<br>
+
Space.Log(“Random AccelerationValue here X:”..Clothing.RandomAcceleration.X..”Y:”.. Clothing.RandomlAcceleration.Y..”Z:”.. Clothing.RandomAcceleration.Z)
+
}}
+
 
+
{{ScriptFunction|float|StretchingStiffness|{get; set;}|Stretching stiffness of the cloth.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.StretchingStiffness = 0.689
+
}}
+
 
+
{{ScriptFunction|bool|UseGravity|{get; set;}|Stretching stiffness of the cloth.|5=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.UseGravity = false
+
}}
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 05:38, 19 September 2022

This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/scloth