AttachToAvatar#
- ExportTransform.AttachToAvatar()#
VCIAttachable で定義された範囲内に 装着 できるボーンが存在した場合に装着を試みます。
以下の条件を満たす場合に装着されます。
エクスポート時に掴める設定と VCIAttachable を設定をした SubItem である
装着されていない状態である
固定状態でない
装着可能なボーンが装着可能な距離に存在する
Example#
local subItem = vci.assets.GetTransform("SubItem")
-- Useする度に装着状態を切り替える
function onUse(use)
if use == "SubItem" then
if subItem.IsAttached then
subItem.DetachFromAvatar()
else
subItem.AttachToAvatar()
end
end
end