wiki.sine.space | sinespace

Difference between revisions of "Scripting/SCloth"

From wiki.sine.space
Jump to: navigation, search
(Created page with "=Properties= {{ScriptFunction|float|BendingStiffness|{get; set;}|Bending stiffness of cloth.|5= Scene = Space.Scene<br> Skeleton = Scene.PlayerAvatar.Skeleton<br> Clothing =...")
 
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/scloth")
 
(One intermediate revision by the same user not shown)
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=
+
Scene = Space.Scene<br>
+
Skeleton = Scene.PlayerAvatar.Skeleton<br>
+
Clothing = Skeleton.Find("Clothing IDXXXXX ( )")<br>
+
Clothing.Enabled = false
+
}}
+
 
+
{{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