BaseWrap

非推奨を表示
作成できません

The base class for WrapTarget and WrapLayer objects. Note that MeshPart is the only valid parent type for BaseWrap and that it behaves more like a component of MeshPart than an independent object.

概要

プロパティ

  • 並列読み取り

    Asset ID for cage mesh.

  • 並列読み取り

    Cage mesh offset relative to parent MeshPart.

  • 読み取り専用
    複製されていません
    並列読み取り

    Cage mesh offset in world space.

  • スクリプト作成できません
    並列読み取り
  • 並列読み取り

    Describes where a global zero was while authoring the cage mesh in an asset creation tool.

  • 読み取り専用
    複製されていません
    並列読み取り

    Describes where the origin (in world space) was while authoring the cage mesh in an asset creation tool.

プロパティ

CageMeshId

並列読み取り
プラグインのセキュリティ

This property is set up automatically by the 3D Importer.

Asset ID for cage mesh.

CageOrigin

並列読み取り
プラグインのセキュリティ

This property is set up automatically by the 3D Importer.

Cage mesh offset relative to parent MeshPart.

CageOriginWorld

読み取り専用
複製されていません
並列読み取り

Cage mesh offset in world space.

HSRAssetId

スクリプト作成できません
並列読み取り
robloxのセキュリティ

ImportOrigin

並列読み取り
プラグインのセキュリティ

This property is set up automatically by the 3D Importer.

Describes where a global zero was while authoring the cage mesh in an asset creation tool such as Blender or Maya. This property is not used by the deformer but it is useful for tools/aligning scripts, for example aligning two parts by matching their pivots as follows:


local function alignWraps()
local selectionService = game:GetService("Selection")
local selectedObjects = selectionService:Get()
local alignObjects = {}
for _, obj in selectedObjects do
if obj:IsA("BaseWrap") then
--print("Wrap: " .. obj.Name)
table.insert(alignObjects, obj)
else
print("Ignore: " .. obj.Name)
end
end
if #alignObjects < 2 then
warn("You need to select at least two wraps")
return
end
local anchorWrap = alignObjects[1]
local worldA_from_Wrap = anchorWrap.ImportOriginWorld
print("Anchor: " .. anchorWrap.Name)
for i = 2, #alignObjects do
local wrapToAlign = alignObjects[i]
print("Align: " .. wrapToAlign.Name)
local wrap_from_WorldB = wrapToAlign.ImportOriginWorld:Inverse()
local worldA_from_WorldB = worldA_from_Wrap * wrap_from_WorldB
local worldB = wrapToAlign.Parent.CFrame
-- Note: adjust CFrame of the parent part
wrapToAlign.Parent.CFrame = (worldB_from_WorldB * worldB)
end
end

ImportOriginWorld

読み取り専用
複製されていません
並列読み取り

Describes where the origin (in world space) was while authoring the cage mesh in an asset creation tool such as Blender or Maya.

方法

イベント