Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 three.js 制作游戏,我有 2 个问题。1. 我有一个立方体,它被推动,但每隔几秒钟它就会“颤抖”一点。为什么?。2. 当我单击向左或向右箭头键时,立方体意味着在其 Y 轴上旋转,而不是单向旋转,它有时会向单向旋转一点,然后再向另一向旋转?
所以我意识到我是在渲染器更新功能而不是物理更新功能中更新相机,所以我移动了它,现在没有抖动了。同样对于旋转,我更改了 .rotation.y -= 0.1; 到 .rotateOnAxis( 新的 THREE.Vector3(0,1,0), -0.05); 现在它可以工作了。