如何在 Three.js 中向前移动对象? [英] How to move an object forward in Three.js?
本文介绍了如何在 Three.js 中向前移动对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在 Three.js 中将对象向前移动?
Is there any way to move an object forward in Three.js?
也许我应该将 rotation.x,y,z 转换为向量,然后处理它.但我是初学者,我不知道该怎么做.
Maybe I should convert the rotation.x,y,z to a vector, and deal with it. But I'm beginner, and I don't have any idea how to do it.
推荐答案
Object3D有一些方便的方法.
object.translateZ( 10 );
这篇关于如何在 Three.js 中向前移动对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文