update
This commit is contained in:
@@ -242,29 +242,12 @@ export class GirlDetailPanel extends li_BaseView {
|
||||
: new Size(600, 800);
|
||||
|
||||
// 获取 videoArea 的中心位置,确保使用正确的世界坐标
|
||||
const videoAreaPos = this.videoAreaPos;
|
||||
if (this.videoArea) {
|
||||
// 获取 videoArea 的世界坐标
|
||||
this.videoAreaPos = this.videoArea.node.getWorldPosition();
|
||||
|
||||
// 也检查 videoLayer 的父节点信息,确保坐标系统一致
|
||||
if (this.videoLayer && this.videoLayer.getVideoPlayer()) {
|
||||
const videoPlayerParent =
|
||||
this.videoLayer.getVideoPlayer().node.parent;
|
||||
if (videoPlayerParent) {
|
||||
const parentWorldPos = videoPlayerParent.getWorldPosition();
|
||||
logger.log(
|
||||
`GirlDetailPanel: VideoPlayer 父节点世界位置: (${parentWorldPos.x}, ${parentWorldPos.y}, ${parentWorldPos.z})`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 使用新的统一 playVideo 方法
|
||||
this.videoLayer.playVideo(firstPath, {
|
||||
loop: true,
|
||||
size: targetSize,
|
||||
position: videoAreaPos,
|
||||
position: this.videoAreaPos,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user