提交 5ec4b1e5 编写于 作者: M Mr.doob

Merge pull request #5527 from pehrlich/vrcontrols-posotion

Add position tracking to VRControls
......@@ -44,11 +44,17 @@ THREE.VRControls = function ( object, callback ) {
if ( vrInput === undefined ) return;
var orientation = vrInput.getState().orientation;
var state = vrInput.getState();
if ( orientation !== null ) {
if ( state.orientation !== null ) {
object.quaternion.set( orientation.x, orientation.y, orientation.z, orientation.w );
object.quaternion.copy( state.orientation );
}
if ( state.position !== null ) {
object.position.copy( state.position );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册