メインコンテンツまでスキップ

transform

エンティティの現在のトランスフォーム(位置、回転、スケール)を取得します。

パラメータ

パラメータ説明
entitynumberトランスフォームを取得するエンティティ ID

戻り値

Promise<Transform>

使用例

const t = await entities.transform(vrmEntity);
console.log("位置:", t.translation); // [x, y, z]
console.log("回転:", t.rotation); // [x, y, z, w] クォータニオン
console.log("スケール:", t.scale); // [x, y, z]