The center of the capsule, measured in the object's local space.
Center = Space.Host.ExecutingObject.CapsuleCollider.Center
--clicking this object moves it's Capsule Collider's center one unit upwards
thisObject = Space.Host.ExecutingObject
OnClick = function()
center = thisObject.CapsuleCollider.Center
thisObject.CapsuleCollider.Center = Vector.New(center.X,center.Y + 1, center.Z)
end
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
Direction
int Directiongetset
The direction of the capsule.
Direction = Space.Host.ExecutingObject.CapsuleCollider.Direction
--clicking this object increases it's Capsule Collider's direction by one unit
thisObject = Space.Host.ExecutingObject
OnClick = function()
thisObject.CapsuleCollider.Direction
thisObject.CapsuleCollider.Direction = thisObject.CapsuleCollider.Direction + 1
end
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
Height
float Heightget set
The height of the capsule measured in the object's local space.
--clicking this object increases it's Capsule Collider's height by one unit
thisObject = Space.Host.ExecutingObject
OnClick = function()
thisObject.CapsuleCollider.Height
thisObject.CapsuleCollider.Height= thisObject.CapsuleCollider.Height+ 1.0
end
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
--clicking this object increments it's Capsule Collider's radius by one unit
thisObject = Space.Host.ExecutingObject
OnClick = function()
thisObject.CapsuleCollider.Radius = thisObject.CapsuleCollider.Radius + 1
end
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)
Enabled
bool Enabledgetset
Enabled Colliders will collide with other Colliders, disabled Colliders won't.
--clicking this object toggles it's Capsule Collider between being a Collider vs Trigger Collider
thisObject = Space.Host.ExecutingObject
OnClick = function()
thisObject.CapsuleCollider.IsTrigger = not thisObject.CapsuleCollider.IsTrigger
end
thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClick)