以参照物为基点更新场景中物体的位置
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
reference | string | 是 | ObjectId | 参照物(坐标基点) |
referenceRotation | string | 是 | 0.0, 0.0, 0.0 | 参照物的旋转量roll,pitch,yaw |
target | string | 是 | ObjectId | 需要更新位置的物体 |
targetLocation | string | 是 | 0.0, 0.0, 0.0 | 以参照物为基点要更新的位置 |
targetRotation | string | 是 | 0.0, 0.0, 0.0 | //以参照物的旋转量为基点要更新的旋转量roll,pitch,yaw |
调用
typescript
piclient.emit("updateLocation.withReference",{
reference: "ObjectId",//参照物(坐标基点)
referenceRotation: "0.0, 0.0, 0.0", //参照物的旋转量roll,pitch,yaw
target: "ObjectId",//需要更新位置的物体
targetLocation: "0.0, 0.0, 0.0",//以参照物为基点要更新的位置
targetRotation: "0.0, 0.0, 0.0", ////以参照物的旋转量为基点要更新的旋转量roll,pitch,yaw
})