同步位置放大1000倍取整
This commit is contained in:
@@ -107,10 +107,13 @@ export class World {
|
||||
return;
|
||||
}
|
||||
|
||||
const x = this.localPlayer.position.x / 1000
|
||||
const y = this.localPlayer.position.y / 1000
|
||||
|
||||
// 实例化玩家节点
|
||||
this.localPlayerNode = instantiate(this.playerPrefab);
|
||||
this.localPlayerNode.name = `Player_${this.localPlayer.id}_Local`;
|
||||
this.localPlayerNode.setPosition(this.localPlayer.position.x, 0, this.localPlayer.position.y);
|
||||
this.localPlayerNode.setPosition(x, 0, y);
|
||||
this.worldRoot.addChild(this.localPlayerNode);
|
||||
|
||||
// 创建本地玩家控制器
|
||||
|
||||
Reference in New Issue
Block a user