播放器控件
PlayerControls是对three.js脚本OrbitControls.js的修改: ://gist.github.com/mrflix/8351020
使用PlayerControls可以快速轻松地访问第三人称玩家控制器:
“导入” Three.js库
< script src =" js/three.js " > </ script >
“导入” PlayerControls.js
< script src =" js/PlayerControls.js " > </ script >
实例化PlayerControls对象(将相机和播放器对象作为参数传递)
var controls = new THREE . PlayerControls ( camera , player ) ;
请记住,播放器是具有position.x,position.
1