ThreeJS - 围绕对象自己的轴旋转 [英] ThreeJS - rotation around object's own axis
问题描述
我正在尝试围绕它自己的轴旋转对象,但没有任何效果.我尝试了文档中的所有功能,Euler 的功能等等.但它根本不想旋转.
I'm trying to rotate object around it's own axis, but nothing want to work. I tried all of functions from documentation, Euler's one, etc. But it just don't want to rotate at all.
推荐答案
也许我可以帮助你:您可以使用此库独立于场景的其余部分旋转对象 https://github.com/albertopiras/threeJS-object-controls.
Maybe I can help you: You can rotate an object independently from the rest of the scene using this library https://github.com/albertopiras/threeJS-object-controls.
var controls = new THREE.ObjectControls(camera, renderer.domElement, yourMesh);
var controls = new THREE.ObjectControls(camera, renderer.domElement, yourMesh);
这里是现场演示 https://albertopiras.github.io/threeJS-object-控件/
这篇关于ThreeJS - 围绕对象自己的轴旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!