用户:
azzzz代码师查看:0 回复:2 评论:0 创建时间:2022-05-24T11:56:00
world.onPlayerJoin(async({ entity })=> {
//设置视角
entity.player.cameraMode = "relative"
entity.player.cameraTarget.y = 1
entity.player.cameraPosition.set(0, 0, -20)//3个数随便调,假设是a1,a2,a3,那么这一行的意思就是指从x+a1,y+a2,z+a3的地方看你()
//禁用WS
entity.player.disableInputDirection = Box3InputDirection.VERTICAL;//这东西是禁止ws的
entity.player.swapInputDirection = true//把这一行注释了后就可以搞事情了(?)
//防止移动出错
entity.player.freezedForwardDirection = new Box3Vector3(1, 0, 0);
})
今天就分享到这了哦!