SJointLimits
Index
Functions Index
Function Name
Properties Index
Property Name
Functions
ToString
Parameter
Type
Description
New
Parameter
Type
Description
LimitsString = Space.Host.ExecutingObject.HingeJoint.Limits.ToString()--the below script will make a UI Text element display this GameObjects Hinge Joint Limits' properties
--[Add "thetext" and "thehingejoint" reference to the Scripting Runtime component]
thisObject = Space.Host.ExecutingObject
text = Space.Host.GetReference("thetext").UIText
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
function OnUpdateFunction()
limits = hingejoint.Limits
text.Text = limits.ToString()
end
thisObject.OnUpdate(OnUpdateFunction)Limits = Space.Host.ExecutingObject.HingeJoint.Limits.New((1,2,3,4,5))--the below script will change all Hinge Joint Limits properties to 0 when clicked
--[Add "thehingejoint" reference to the Scripting Runtime component]
thisObject = Space.Host.ExecutingObject
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
function OnClickFunction()
limits = hingejoint.Limits
hingejoint.Limits = limits.New(0,0,0,0,0)
end
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)LimitsMin = Space.Host.ExecutingObject.HingeJoint.Limits.Min--the below script will make a slider change a Hinge Joint Limits Min property
--[Add "theslider" and "thehingejoint" reference to the Scripting Runtime component]
slider = Space.Host.GetReference("theslider").UISlider
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
OVC = function()
limits = hingejoint.Limits
limits.Min = (slider.Value * 10.0) -- from 0.0 to 10.0
hingejoint.Limits = limits
end
slider.OnValueChanged(OVC)LimitsMax= Space.Host.ExecutingObject.HingeJoint.Limits.Max --the below script will make a slider change a Hinge Joint Limits Max property
--[Add "theslider" and "thehingejoint" reference to the Scripting Runtime component]
slider = Space.Host.GetReference("theslider").UISlider
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
OVC = function()
limits = hingejoint.Limits
limits.Max = (slider.Value * 10.0) -- from 0.0 to 10.0
hingejoint.Limits = limits
end
slider.OnValueChanged(OVC)LimitsBounciness = Space.Host.ExecutingObject.HingeJoint.Limits.Bounciness --the below script will make a slider change a Hinge Joint Limits Bounciness property
--[Add "theslider" and "thehingejoint" reference to the Scripting Runtime component]
slider = Space.Host.GetReference("theslider").UISlider
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
OVC = function()
limits = hingejoint.Limits
limits.Bounciness = (slider.Value * 1.0) -- from 0.0 to 1.0
hingejoint.Limits = limits
end
slider.OnValueChanged(OVC) LimitsBounceMinVelocity = Space.Host.ExecutingObject.HingeJoint.Limits.BounceMinVelocity--the below script will make a slider change a Hinge Joint Limits BounceMinVelocity property
--[Add "theslider" and "thehingejoint" reference to the Scripting Runtime component]
slider = Space.Host.GetReference("theslider").UISlider
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
OVC = function()
limits = hingejoint.Limits
limits.BounceMinVelocity = (slider.Value * 10.0) -- from 0.0 to 10.0
hingejoint.Limits = limits
end
slider.OnValueChanged(OVC)LimitsContactDistance = Space.Host.ExecutingObject.HingeJoint.Limits.ContactDistance--the below script will make a slider change a Hinge Joint Limits Contact Distance property
--[Add "theslider" and "thehingejoint" reference to the Scripting Runtime component]
slider = Space.Host.GetReference("theslider").UISlider
hingejoint = Space.Host.GetReference("thehingejoint").HingeJoint
OVC = function()
limits = hingejoint.Limits
limits.ContactDistance = (slider.Value * 10.0) -- from 0.0 to 10.0
hingejoint.Limits = limits
end
slider.OnValueChanged(OVC)