updateLocation.withReference

更新位置-以参照物为基点

模块:Path调用:piclient.emit('updateLocation.withReference', {...})

以参照物为基点更新场景中物体的位置

参数说明

参数类型必填默认值说明
referencestring否ObjectId参照物(坐标基点)
referenceRotationstring否0.0, 0.0, 0.0参照物的旋转量roll,pitch,yaw
targetstring否ObjectId需要更新位置的物体
targetLocationstring否0.0, 0.0, 0.0以参照物为基点要更新的位置
targetRotationstring否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
})
← 返回 Path 模块