Three.js:改变上轴的方式? [英] Three.js: way to change the up axis?
本文介绍了Three.js:改变上轴的方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到ColladaLoader有一个方法来设置upAxis为Z...有一种方法来做Three.js适当的,使摄像机的轴是Z?
I see that the ColladaLoader has a way to set the upAxis to 'Z' ... is there a way to do that in Three.js proper so that the camera's up axis is Z?
谢谢!
推荐答案
您可以将相机向上设置
vector这样:
You can set the camera up
vector like so:
camera.up.set( 0, 0, 1 );
然后当您调用 camera.lookAt(point)$ c $
Then when you call camera.lookAt( point )
, it will work as you expect.
编辑:更新为three.js r.68
Updated to three.js r.68
这篇关于Three.js:改变上轴的方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文